AzureCredentialResolver Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A CredentialResolver that produces Azure
TokenCredential instances from an
IConfigurationSection, dispatching on the section's
CredentialSource value (e.g. AzureCliCredential,
ManagedIdentityCredential, EnvironmentCredential,
WorkloadIdentityCredential, ChainedTokenCredential).
public sealed class AzureCredentialResolver : System.ClientModel.Primitives.CredentialResolver
type AzureCredentialResolver = class
inherit CredentialResolver
Public NotInheritable Class AzureCredentialResolver
Inherits CredentialResolver
- Inheritance
Remarks
Register this resolver explicitly via AddAzureCredentialResolver(IServiceCollection) (or its host-builder overload), or rely on GetAzureCredentialSettings(IConfiguration, String) and friends, which transparently append a built-in instance to the resolver chain. The class has a public parameterless constructor so it can be used with AddCredentialResolver.
Constructors
| Name | Description |
|---|---|
| AzureCredentialResolver() |
Initializes a new instance of AzureCredentialResolver. |
Properties
| Name | Description |
|---|---|
| Default |
A shared singleton suitable for standalone callers that want to participate in the process-wide resolved-credential cache without allocating a new resolver instance per call. |
Methods
| Name | Description |
|---|---|
| TryResolve(IConfigurationSection, AuthenticationTokenProvider) |
Attempts to construct an AuthenticationTokenProvider for the supplied credential configuration section. |
|
TryResolve(IConfigurationSection, Func |
Attempts to construct an AuthenticationTokenProvider for the supplied credential configuration section, with access to a callback that recursively resolves child sections through the same active resolver chain. (Inherited from CredentialResolver) |
|
TryResolveCore(IConfigurationSection, Func |
Override to implement chain-aware resolution. The default implementation
ignores |