Class SharedTokenCacheCredential
Authenticates using tokens in the local cache shared between Microsoft applications.
Inheritance
SharedTokenCacheCredential
Assembly: Azure.Identity.dll
Syntax
public class SharedTokenCacheCredential : Azure.Core.TokenCredential
Constructors
Creates a new SharedTokenCacheCredential which will authenticate users signed in through developer tools supporting Azure single sign on.
Declaration
public SharedTokenCacheCredential ();
Creates a new SharedTokenCacheCredential which will authenticate users signed in through developer tools supporting Azure single sign on.
Declaration
public SharedTokenCacheCredential (Azure.Identity.SharedTokenCacheCredentialOptions options);
Parameters
Creates a new SharedTokenCacheCredential which will authenticate users signed in through developer tools supporting Azure single sign on.
Declaration
[System.ComponentModel.EditorBrowsable]
public SharedTokenCacheCredential (string username, Azure.Identity.TokenCredentialOptions options = null);
Parameters
Methods
Obtains an AccessToken token for a user account silently if the user has already authenticated to another Microsoft application participating in SSO through a shared MSAL cache. This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing.
Declaration
public override Azure.Core.AccessToken GetToken (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = null);
Parameters
Returns
Obtains an AccessToken token for a user account silently if the user has already authenticated to another Microsoft application participating in SSO through a shared MSAL cache. This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = null);
Parameters
Returns