diff --git a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs
index 27b18bf2c1abd..8d12a0b9f7114 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs
@@ -115,6 +115,7 @@ internal AuthorizationCodeCredential(string tenantId, string clientId, string cl
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -128,6 +129,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs
index 9bfb87b39b97a..4beab62212716 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs
@@ -51,6 +51,7 @@ internal AzureApplicationCredential(AzureApplicationCredentialOptions options, E
/// The details of the authentication request.
/// A controlling the request lifetime.
/// The first returned by the specified sources. Any credential which raises a will be skipped.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
=> GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -62,6 +63,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// The first returned by the specified sources. Any credential which raises a will be skipped.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
=> await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs
index 477958dbde6c1..6ac687b003330 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs
@@ -84,9 +84,10 @@ internal AzureCliCredential(CredentialPipeline pipeline, IProcessService process
///
/// Obtains a access token from Azure CLI credential, using this access token to authenticate. This method called by Azure SDK clients.
///
- ///
- ///
- ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -95,9 +96,10 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
///
/// Obtains a access token from Azure CLI service, using the access token to authenticate. This method id called by Azure SDK clients.
///
- ///
- ///
- ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs
index 2c80b4a121e29..c8bbb86b94487 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs
@@ -76,9 +76,10 @@ internal AzureDeveloperCliCredential(CredentialPipeline pipeline, IProcessServic
///
/// Obtains an access token from Azure Developer CLI credential, using this access token to authenticate. This method called by Azure SDK clients.
///
- ///
- ///
- /// AccessToken
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -87,9 +88,10 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
///
/// Obtains an access token from Azure Developer CLI service, using the access token to authenticate. This method is called by Azure SDK clients.
///
- ///
- ///
- ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs
index 36cf15fba5f4f..1425f14a94fe8 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs
@@ -67,11 +67,23 @@ public AzurePipelinesCredential(string tenantId, string clientId, string service
AdditionallyAllowedTenantIds = TenantIdResolver.ResolveAddionallyAllowedTenantIds((options as ISupportsAdditionallyAllowedTenants)?.AdditionallyAllowedTenants);
}
- ///
+ ///
+ /// Obtains an access token from within an Azure Pipelines environment.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
=> GetTokenCoreAsync(false, requestContext, cancellationToken).EnsureCompleted();
- ///
+ ///
+ /// Obtains an access token from within an Azure Pipelines environment.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
=> await GetTokenCoreAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs
index e9fb0041ae779..4528f541feff3 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs
@@ -76,9 +76,10 @@ internal AzurePowerShellCredential(AzurePowerShellCredentialOptions options, Cre
///
/// Obtains a access token from Azure PowerShell, using the access token to authenticate. This method id called by Azure SDK clients.
///
- ///
- ///
- ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -87,9 +88,10 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
///
/// Obtains a access token from Azure PowerShell, using the access token to authenticate. This method id called by Azure SDK clients.
///
- ///
- ///
- ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs
index 9c9952ee56aa2..b20b595153548 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs
@@ -76,6 +76,7 @@ public ChainedTokenCredential(params TokenCredential[] sources)
/// The details of the authentication request.
/// A controlling the request lifetime.
/// The first returned by the specified sources. Any credential which raises a will be skipped.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
=> GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -87,6 +88,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// The first returned by the specified sources. Any credential which raises a will be skipped.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
=> await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs
index 979f9737d2ca5..f552f69a3b61a 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs
@@ -76,6 +76,7 @@ public ClientAssertionCredential(string tenantId, string clientId, Func
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
using CredentialDiagnosticScope scope = Pipeline.StartGetTokenScope("ClientAssertionCredential.GetToken", requestContext);
@@ -100,6 +101,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public async override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
using CredentialDiagnosticScope scope = Pipeline.StartGetTokenScope("ClientAssertionCredential.GetToken", requestContext);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs
index 294ea57676f83..bba259f194ba4 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs
@@ -180,6 +180,7 @@ internal ClientCertificateCredential(
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientCertificateCredential.GetToken", requestContext);
@@ -205,6 +206,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientCertificateCredential.GetToken", requestContext);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs
index 530099c75ab79..4e308905a064d 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs
@@ -109,6 +109,7 @@ internal ClientSecretCredential(string tenantId, string clientId, string clientS
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientSecretCredential.GetToken", requestContext);
@@ -132,6 +133,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientSecretCredential.GetToken", requestContext);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs
index cfea7989d1b8a..5a30b98f63a4a 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs
@@ -109,6 +109,7 @@ internal DefaultAzureCredential(DefaultAzureCredentialFactory factory)
/// The details of the authentication request.
/// A controlling the request lifetime.
/// The first returned by the specified sources. Any credential which raises a will be skipped.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -127,6 +128,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// The first returned by the specified sources. Any credential which raises a will be skipped.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs
index 1f282f5f15cc7..2203ccedd83c5 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs
@@ -104,6 +104,7 @@ internal DeviceCodeCredential(Func devi
///
/// A controlling the request lifetime.
/// The result of the authentication request, containing the acquired , and the which can be used to silently authenticate the account.
+ /// Thrown when the authentication failed.
public virtual AuthenticationRecord Authenticate(CancellationToken cancellationToken = default)
{
// throw if no default scope exists
@@ -120,6 +121,7 @@ public virtual AuthenticationRecord Authenticate(CancellationToken cancellationT
///
/// A controlling the request lifetime.
/// The which can be used to silently authenticate the account on future execution of credentials using the same persisted token cache.
+ /// Thrown when the authentication failed.
public virtual async Task AuthenticateAsync(CancellationToken cancellationToken = default)
{
// throw if no default scope exists
@@ -137,6 +139,7 @@ public virtual async Task AuthenticateAsync(CancellationTo
/// A controlling the request lifetime.
/// The details of the authentication request.
/// The of the authenticated account.
+ /// Thrown when the authentication failed.
public virtual AuthenticationRecord Authenticate(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return AuthenticateImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -148,6 +151,7 @@ public virtual AuthenticationRecord Authenticate(TokenRequestContext requestCont
/// A controlling the request lifetime.
/// The details of the authentication request.
/// The of the authenticated account.
+ /// Thrown when the authentication failed.
public virtual async Task AuthenticateAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await AuthenticateImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
@@ -161,6 +165,7 @@ public virtual async Task AuthenticateAsync(TokenRequestCo
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -174,6 +179,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs
index 350e9be122a7a..64a408fd0fc8c 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs
@@ -137,6 +137,8 @@ internal EnvironmentCredential(CredentialPipeline pipeline, TokenCredential cred
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
+ /// Thrown when the credential is unavailable because the environment is not properly configured.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -154,6 +156,8 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls, or a default .
+ /// Thrown when the authentication failed.
+ /// Thrown when the credential is unavailable because the environment is not properly configured.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs
index a8ca1101081e9..8101b15c75a64 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs
@@ -167,6 +167,7 @@ public virtual async Task AuthenticateAsync(TokenRequestCo
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
#if PREVIEW_FEATURE_FLAG
@@ -184,6 +185,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
#if PREVIEW_FEATURE_FLAG
@@ -202,6 +204,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public AccessToken GetToken(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -215,6 +218,7 @@ public AccessToken GetToken(PopTokenRequestContext requestContext, CancellationT
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public async ValueTask GetTokenAsync(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
@@ -226,6 +230,7 @@ public async ValueTask GetTokenAsync(PopTokenRequestContext request
/// A controlling the request lifetime.
/// The details of the authentication request.
/// The of the authenticated account.
+ /// Thrown when the authentication failed.
public virtual AuthenticationRecord Authenticate(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return AuthenticateImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -237,6 +242,7 @@ public virtual AuthenticationRecord Authenticate(PopTokenRequestContext requestC
/// A controlling the request lifetime.
/// The details of the authentication request.
/// The of the authenticated account.
+ /// Thrown when the authentication failed.
public virtual async Task AuthenticateAsync(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await AuthenticateImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs
index c5665314c25d1..ebc4e80dfaa34 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs
@@ -86,6 +86,7 @@ internal ManagedIdentityCredential(ManagedIdentityClient client)
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls, or a default if no managed identity is available.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
@@ -99,6 +100,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls, or a default if no managed identity is available.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
diff --git a/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs
index 298835e1be301..5f3ff5c026fa4 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs
@@ -218,6 +218,7 @@ internal OnBehalfOfCredential(
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) =>
GetTokenInternalAsync(requestContext, false, cancellationToken).EnsureCompleted();
@@ -230,6 +231,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) =>
GetTokenInternalAsync(requestContext, true, cancellationToken);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs
index 3af25a60b05ba..b20e1556b45f6 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs
@@ -95,6 +95,7 @@ internal SharedTokenCacheCredential(string tenantId, string username, TokenCrede
/// The details of the authentication request.
/// A controlling the request lifetime
/// An which can be used to authenticate service client calls
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -108,6 +109,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime
/// An which can be used to authenticate service client calls
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs
index 7d24abf6914fd..f2c5e5311868f 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs
@@ -170,6 +170,7 @@ public virtual async Task AuthenticateAsync(TokenRequestCo
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted();
@@ -184,6 +185,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell
/// The details of the authentication request.
/// A controlling the request lifetime.
/// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false);
diff --git a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs
index 3a3275e704652..c3755995a5822 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs
@@ -60,11 +60,23 @@ internal VisualStudioCodeCredential(VisualStudioCodeCredentialOptions options, C
AdditionallyAllowedTenantIds = TenantIdResolver.ResolveAddionallyAllowedTenantIds((options as ISupportsAdditionallyAllowedTenants)?.AdditionallyAllowedTenants);
}
- ///
+ ///
+ /// Obtains a access token from account signed in to Visual Studio Code.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
=> await GetTokenImplAsync(requestContext, true, cancellationToken).ConfigureAwait(false);
- ///
+ ///
+ /// Obtains a access token from account signed in to Visual Studio Code.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
=> GetTokenImplAsync(requestContext, false, cancellationToken).EnsureCompleted();
diff --git a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs
index 2293df746e54d..e72a2daa0c4f1 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs
@@ -65,11 +65,23 @@ internal VisualStudioCredential(string tenantId, CredentialPipeline pipeline, IF
_isChainedCredential = options?.IsChainedCredential ?? false;
}
- ///
+ ///
+ /// Obtains a access token from account signed in to Visual Studio.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
=> await GetTokenImplAsync(requestContext, true, cancellationToken).ConfigureAwait(false);
- ///
+ ///
+ /// Obtains a access token from account signed in to Visual Studio.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
=> GetTokenImplAsync(requestContext, false, cancellationToken).EnsureCompleted();
diff --git a/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs
index db4bd85fa26ed..d1ccf215e2c53 100644
--- a/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs
+++ b/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs
@@ -52,13 +52,25 @@ public WorkloadIdentityCredential(WorkloadIdentityCredentialOptions options)
_pipeline = _clientAssertionCredential?.Pipeline ?? CredentialPipeline.GetInstance(default);
}
- ///
+ ///
+ /// Obtains a access token for the specified set of scopes.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return GetTokenCoreAsync(false, requestContext, cancellationToken).EnsureCompleted();
}
- ///
+ ///
+ /// Obtains a access token for the specified set of scopes.
+ ///
+ /// The details of the authentication request.
+ /// A controlling the request lifetime.
+ /// An which can be used to authenticate service client calls.
+ /// Thrown when the authentication failed.
public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
{
return await GetTokenCoreAsync(true, requestContext, cancellationToken).ConfigureAwait(false);