question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SharedTokenCacheCredential/Azure.Identity: Support enforcing a tenant

See original GitHub issue

I am currently evaluating the Azure.Identity library for a project developed for azure. Use-cases are accessing blob storage, sql, key vault etc. and it looks like Azure.Identity is the way forward.

When starting from the documented samples, we faced the issue that the SharedTokenCacheCredential does not support providing a desired tenant id. In situations where azure resources are managed/developed by external/guest/invited AAD users, the token cache contains tokens issued by the “home/native tenant” of the user. If the blob storage resource is attached to another AAD tenant this will cause 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. while accessing the blob store.

Furthermore the default factory created instance of InteractiveBrowserCredential cannot be configured to pass the tenant through to AAD which results in the default behavior of logging into the user’s home tenant.

A general/consistent way of providing the desired tenant (e.g. via DefaultAzureCredentialOptions) would allow users to stick close to the default and avoid having to setup own credential chains or redevelop a custom token cache lookup.

Are there any plans to support this scenario? Thank you in advance for looking into this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
joshfreecommented, Nov 20, 2019

Closing this issue as we’re planning to release an update in December. Please feel free to reactivate if the 1.1.0 package doesn’t fix your issue.

1reaction
schaabscommented, Nov 8, 2019

@sopelt I’ve split this issue into two issues, #8689 and #8691, so they can be tracked separately. Currently, both of these are tracking to be fixed as part of our December milestone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

azure.identity.aio.SharedTokenCacheCredential class
Authenticates using tokens in the local cache shared between Microsoft applications.
Read more >
Enable support for TLS 1.2 in your environment for Azure ...
This article describes how to enable support for TLS 1.2 in your environment, in preparation for upcoming Azure AD TLS 1.0/1.1 deprecation.
Read more >
Azure SDK: What's new in the Azure Identity August 2020 ...
Authenticate to a Specific Tenant ... By default, the credentials will authenticate a user account to its home tenant. You can configure ...
Read more >
Configure tenant restrictions - Azure AD - Microsoft Entra
Use tenant restrictions to control the types of external accounts your users can use on your networks and the devices you manage.
Read more >
Azure Identity client library for .NET
The Azure Identity library provides Azure Active Directory (Azure AD) token authentication support across the Azure SDK.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found