ITokenCredentialProvider
Interface net8.0
Provides access to the
ITokenCredentialProvider.TokenCredential that Aspire uses to authenticate against Azure when provisioning resources and calling Azure APIs. namespace Aspire.Hosting.Azure;
public interface ITokenCredentialProvider{ // ...}Remarks
Section titled Remarks This service is registered as a singleton when Azure provisioning is enabled (e.g., by AddAzureProvisioning).
Integrations and app host code can resolve this service from IServiceProvider to obtain a ITokenCredentialProvider.TokenCredential instance configured by Aspire's Azure provisioning options (for example, the configured tenant id and credential source). The concrete credential type returned by ITokenCredentialProvider.TokenCredential is an implementation detail and may change between releases; callers should treat the value as an opaque ITokenCredentialProvider.TokenCredential.