Azure.Identity.ConfigurationExtensions
Provides extension methods for IConfiguration interface.
public static IClientBuilder AddAzureClient<TClient, TSettings>(this IHostApplicationBuilder host, string sectionName) where TSettings : ClientSettings
Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.
public static IClientBuilder AddAzureClient<TClient, TSettings>(this IHostApplicationBuilder host, string sectionName, Action<TSettings> configureSettings) where TSettings : ClientSettings
Adds a singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.
Registers AzureCredentialResolver in the service collection.
Idempotent — repeated calls do not produce duplicate registrations.
public static IHostApplicationBuilder AddAzureCredentialResolver(this IHostApplicationBuilder builder)
Registers AzureCredentialResolver on the host's service collection.
Idempotent — repeated calls do not produce duplicate registrations.
public static IClientBuilder AddKeyedAzureClient<TClient, TSettings>(this IHostApplicationBuilder host, string key, string sectionName) where TSettings : ClientSettings
Adds a keyed singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.
public static IClientBuilder AddKeyedAzureClient<TClient, TSettings>(this IHostApplicationBuilder host, string key, string sectionName, Action<TSettings> configureSettings) where TSettings : ClientSettings
Adds a keyed singleton Azure client of the specified type to the IHostApplicationBuilder's service collection.
public static T GetAzureClientSettings<T>(this IConfiguration configuration, string sectionName) where T : ClientSettings
Creates an instance of T and sets its properties from the specified IConfiguration.
public static T GetAzureClientSettings<T>(this IConfiguration configuration, string sectionName, CredentialResolver[] resolvers) where T : ClientSettings
Creates an instance of T and sets its properties from the specified IConfiguration.
The bound settings' TokenProvider is resolved via the supplied
CredentialResolver chain together with a built-in AzureCredentialResolver
appended to the end of the chain (so caller-supplied resolvers take precedence).
public static T GetAzureClientSettings<T>(this IConfiguration configuration, string sectionName, IEnumerable<CredentialResolver> resolvers, Action<IConfigurationSection> configureOverrides) where T : ClientSettings
Creates an instance of T from the named configuration section,
applying configureOverrides to the credential section before resolution.
The bound settings' TokenProvider is resolved via the supplied
CredentialResolver chain together with a built-in AzureCredentialResolver
appended to the end of the chain (so caller-supplied resolvers take precedence).
public static CredentialSettings GetAzureCredentialSettings(this IConfiguration configuration, string sectionName)
Returns the CredentialSettings bound from the named credential
section, with TokenProvider populated by the
built-in AzureCredentialResolver when it claims the section.
public static CredentialSettings GetAzureCredentialSettings(this IConfiguration configuration, string sectionName, CredentialResolver[] resolvers)
Returns the CredentialSettings bound from the named credential section.
Caller-supplied resolvers are evaluated in order; the built-in
AzureCredentialResolver is appended to the chain as a fallback. The
first resolver to claim the section populates TokenProvider.
public static CredentialSettings GetAzureCredentialSettings(this IConfiguration configuration, string sectionName, IEnumerable<CredentialResolver> resolvers, Action<IConfigurationSection> configureOverrides)
Returns the CredentialSettings bound from the named credential section,
applying configureOverrides to the credential section before resolving.
Caller-supplied resolvers are evaluated in order; the built-in
AzureCredentialResolver is appended to the chain as a fallback.