<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.19" />

Microsoft.Rest.TokenCredentials

Token based credentials for use with a REST Service Client.
public string CallerId { get; }

Gets UserInfo.DisplayableId

public string TenantId { get; }

Gets Tenant ID

protected ITokenProvider TokenProvider { get; }

Gets or sets secure token used to authenticate against Microsoft Azure API. No anonymous requests are allowed.

public TokenCredentials(string token)

Initializes a new instance of the TokenCredentials class with the given 'Bearer' token.

public TokenCredentials(string token, string tokenType)

Initializes a new instance of the TokenCredentials class with the given token and token type.

public TokenCredentials(ITokenProvider tokenProvider)

Create an access token credentials object, given an interface to a token source.

public TokenCredentials(ITokenProvider tokenProvider, string tenantId, string callerId)

Create an access token credentials object, given an interface to a token source.