[QUERY] Recommended lifetime to DefaultAzureCredential #31202
Labels
Azure.Identity
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-author-feedback
Workflow: More information is needed from author to address the issue.
no-recent-activity
There has been no recent activity on this issue.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Library name and version
Azure.Identity 1.6.1
Query/Question
What is the recommended lifecycle for the DefaultAzureCredential?
Does this recommendation also apply for DefaultAzureCredential?
For example, if we need to retrieve a token for a HTTP dependency, a common pattern is via a Delegating Handler
Is the recommended approach to create a new instance of
DefaultAzureCredential
every time? or should it be a singleton? or one per type of client?It would be great to document this, defining the different compromises e.g. token caching
Thank you!
Environment
No response
The text was updated successfully, but these errors were encountered: