<PackageReference Include="Azure.Core" Version="1.53.0" />

Azure.Identity.ConfigurationExtensions

public static class 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.

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 WithAzureCredential<T>(this T settings) where T : ClientSettings

Sets the CredentialProvider to an instance of TokenCredential.

public static IClientBuilder WithAzureCredential(this IClientBuilder clientBuilder)

Registers a credential factory to return a TokenCredential to use for the current IClientBuilder. If the same credential configuration has already been registered, the existing credential instance is reused.