Delen via


TokenProvider.CreateManagedIdentityTokenProvider Method

Definition

Overloads

CreateManagedIdentityTokenProvider(Uri)

Creates a TokenProvider using a default AzureServiceTokenProvider instance. This overload will authenticate with managed identities for Azure resources. For more details on AzureServiceTokenProvider, please see http://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support.

CreateManagedIdentityTokenProvider(AzureServiceTokenProvider, Uri)

Creates a TokenProvider using a default AzureServiceTokenProvider instance. This overload will allow authentication with both managed and user-assigned identities for Azure resources. For more details on AzureServiceTokenProvider, please see http://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support.

CreateManagedIdentityTokenProvider(Uri)

Creates a TokenProvider using a default AzureServiceTokenProvider instance. This overload will authenticate with managed identities for Azure resources. For more details on AzureServiceTokenProvider, please see http://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support.

public static Microsoft.ServiceBus.TokenProvider CreateManagedIdentityTokenProvider (Uri audience);
static member CreateManagedIdentityTokenProvider : Uri -> Microsoft.ServiceBus.TokenProvider
Public Shared Function CreateManagedIdentityTokenProvider (audience As Uri) As TokenProvider

Parameters

audience
Uri

The service resource URI for token acquisition.

Returns

The TokenProvider for returning Json web token.

Applies to

CreateManagedIdentityTokenProvider(AzureServiceTokenProvider, Uri)

Creates a TokenProvider using a default AzureServiceTokenProvider instance. This overload will allow authentication with both managed and user-assigned identities for Azure resources. For more details on AzureServiceTokenProvider, please see http://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support.

public static Microsoft.ServiceBus.TokenProvider CreateManagedIdentityTokenProvider (Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProvider azureServiceTokenProvider, Uri audience);
static member CreateManagedIdentityTokenProvider : Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProvider * Uri -> Microsoft.ServiceBus.TokenProvider
Public Shared Function CreateManagedIdentityTokenProvider (azureServiceTokenProvider As AzureServiceTokenProvider, audience As Uri) As TokenProvider

Parameters

azureServiceTokenProvider
AzureServiceTokenProvider

The AzureServiceTokenProvider instance used to obtain the security token.

audience
Uri

The service resource URI for token acquisition.

Returns

The TokenProvider for returning Json web token.

Applies to