Open imborge opened 5 days ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @imborge - Would you mind trying to reproduce this with the latest Azure.Identity (1.13.1), and share the full stack trace of the exception? In addition, could you please capture logging during the repro and share that as well?
For console output, you would just need to add the following line to your program.
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger();
If you need to log the output somewhere other than the console, this can be done as described in these docs.
Hi @imborge. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Hi @christothes - I've upgraded to Azure.Identity 1.13.1 and added the line for logging you've asked for. I've included the updated code and console output with stack trace below
Updated Home.razor:
@page "/"
@using System.Security.Cryptography
@using Azure.Core.Diagnostics
@using Azure.ResourceManager
@using Azure.ResourceManager.Sql
@using Microsoft.AspNetCore.WebUtilities
@using Azure
@using Azure.Core
@using Azure.Identity
@inject NavigationManager _navManager
@inject IConfiguration _config
@code {
private string _redirectUri = string.Empty;
private string _scope = string.Empty;
public string CreateAzureAuthorizeUrl(string tenantId, string clientId, string scope, string redirectUri)
{
var state = Convert.ToBase64String(RandomNumberGenerator.GetBytes(32));
string url = $"https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/authorize";
var queryParameters = new Dictionary<string, string?>
{
{ "client_id", clientId },
{ "response_type", "code" },
{ "redirect_uri", redirectUri },
{ "response_mode", "query" },
{ "scope", scope },
{ "state", state }
};
return QueryHelpers.AddQueryString(url, queryParameters);
}
protected override async Task OnParametersSetAsync()
{
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger();
var queryStr = string.Join("", _navManager.Uri.SkipWhile(c => c != '?'));
var query = QueryHelpers.ParseQuery(queryStr);
foreach (var x in query)
{
Console.WriteLine($"{x.Key}: {x.Value}");
}
if (query.TryGetValue("code", out var code)
&& query.TryGetValue("state", out var state)
&& query.TryGetValue("session_state", out var session_state))
{
var cred = new AuthorizationCodeCredential(_config["TenantID"], _config["ClientID"], _config["ClientSecret"], code, new AuthorizationCodeCredentialOptions
{
RedirectUri = new Uri(_config["RedirectURL"]!)
});
// Does not throw exception here, but will instead throw when ArmClient is used
var token = await cred.GetTokenAsync(new TokenRequestContext(new[]
{
"https://management.azure.com/user_impersonation",
}));
var token2 = await cred.GetTokenAsync(new TokenRequestContext(new []
{
"https://database.windows.net/user_impersonation",
}));
var _armClient = new ArmClient(cred);
var sqlServerResource = _armClient.GetSqlServerResource(SqlServerResource.CreateResourceIdentifier(
_config["SubscriptionId"]
, _config["ResourceGroupName"]
, _config["DbServer"]
));
var dbPools = sqlServerResource.GetElasticPools();
// Throws exception here:
foreach (var y in dbPools)
{
Console.WriteLine($"{y.Id}");
}
}
}
}
<PageTitle>Home</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.
<a href="@CreateAzureAuthorizeUrl(_config["TenantID"]!, _config["ClientID"]!, _config["Scope"]!, _config["RedirectURL"]!)">Authenticate</a>
Here is the full output including the stack trace:
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:7106
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5067
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\BørgeAndréJensen\contracting-experiments\source\AzureIdentityExample
code: <redacted>
state: <redacted>
session_state: <redacted>
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
Azure.Identity.AuthenticationFailedException: AuthorizationCodeCredential authentication failed:
---> MSAL.NetCore.4.66.1.0.MsalUiRequiredException:
ErrorCode: invalid_grant
Microsoft.Identity.Client.MsalUiRequiredException: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: 423cd890-3860-4a7d-8319-582af5f14c00 Correlation ID: 10bcf5a2-efca-4bb1-9f70-3949aea4b122 Timestamp: 2024-10-29 08:25:07Z
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ThrowServerException(HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.CreateResponse[T](HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ExecuteRequestAsync[T](Uri endPoint, HttpMethod method, RequestContext requestContext, Boolean expectErrorsOn200OK, Boolean addCommonHeaders, Func`2 onBeforePostRequestData)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.ConfidentialAuthCodeRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenByAuthorizationCodeParameters authorizationCodeParameters, CancellationToken cancellationToken)
at Azure.Identity.AbstractAcquireTokenParameterBuilderExtensions.ExecuteAsync[T](AbstractAcquireTokenParameterBuilder`1 builder, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalConfidentialClient.AcquireTokenByAuthorizationCodeCoreAsync(String[] scopes, String code, String tenantId, String redirectUri, String claims, Boolean enableCae, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalConfidentialClient.AcquireTokenByAuthorizationCodeAsync(String[] scopes, String code, String tenantId, String redirectUri, String claims, Boolean enableCae, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.AuthorizationCodeCredential.AcquireTokenWithCode(Boolean async, TokenRequestContext requestContext, String tenantId, CancellationToken cancellationToken)
at Azure.Identity.AuthorizationCodeCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
StatusCode: 400
ResponseBody: {"error":"invalid_grant","error_description":"AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: 423cd890-3860-4a7d-8319-582af5f14c00 Correlation ID: 10bcf5a2-efca-4bb1-9f70-3949aea4b122 Timestamp: 2024-10-29 08:25:07Z","error_codes":[54005],"timestamp":"2024-10-29 08:25:07Z","trace_id":"423cd890-3860-4a7d-8319-582af5f14c00","correlation_id":"10bcf5a2-efca-4bb1-9f70-3949aea4b122"}
Headers: Cache-Control: no-store, no-cache
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
client-request-id: 10bcf5a2-efca-4bb1-9f70-3949aea4b122
x-ms-request-id: 423cd890-3860-4a7d-8319-582af5f14c00
x-ms-ests-server: 2.1.19267.5 - SEC ProdSlices
x-ms-clitelem: 1,54005,0,,
x-ms-srs: 1.P
X-XSS-Protection: 0
Set-Cookie: fpc=<redacted>; expires=Thu, 28-Nov-2024 08:25:07 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/; secure; samesite=none; httponly
Date: Tue, 29 Oct 2024 08:25:07 GMT
--- End of inner exception stack trace ---
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage, Boolean isCredentialUnavailable)
at Azure.Identity.AuthorizationCodeCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Identity.AuthorizationCodeCredential.GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.SetResultOnTcsFromCredentialAsync(TokenRequestContext context, TaskCompletionSource`1 targetTcs, Boolean async, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetAuthHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](Task`1 task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.TokenRequestState.GetCurrentHeaderValue(Boolean async, Boolean checkForCompletion, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetAuthHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AuthenticateAndAuthorizeRequest(HttpMessage message, TokenRequestContext context)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AuthorizeRequest(HttpMessage message)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.RedirectPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken)
at Azure.Core.PageableHelpers.PageableImplementation`1.GetNextResponse(Nullable`1 pageSizeHint, String nextLink)
at Azure.Core.PageableHelpers.PageableImplementation`1.GetEnumerator()+MoveNext()
at AzureIdentityExample.Components.Pages.Home.OnParametersSetAsync() in C:\Users\BørgeAndréJensen\contracting-experiments\source\AzureIdentityExample\Components\Pages\Home.razor:line 75
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.WaitForResultReady(Boolean waitForQuiescence, PrerenderedComponentHtmlContent result)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.RenderEndpointComponent(HttpContext httpContext, Type rootComponentType, ParameterView parameters, Boolean waitForQuiescence)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Thanks for the additional information, @imborge, but I don't see the logging output from Azure.Identity above. Perhaps you need to route it through an ILogger injected to the page? You can do this via a custom logger that writes to your ILogger instance.
Hi @imborge. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Thanks @christothes. I've now correctly added logging and this is the complete console output including logs and the stack trace:
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:7106
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5067
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\BørgeAndréJensen\contracting-experiments\source\AzureIdentityExample
[11:58:52:625][Informational] AuthorizationCodeCredential.GetToken invoked. Scopes: [ https://management.azure.com/user_impersonation ] ParentRequestId:
[11:58:52:654][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z] ConfidentialClientApplication 26517107 created
[11:58:52:658][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] MSAL MSAL.NetCore with assembly version '4.66.1.0'. CorrelationId(b04b10f7-dd3b-4e07-85dc-d72446ac6cd6)
[11:58:52:665][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com/user_impersonation
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenByAuthorizationCode
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[11:58:52:666][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] === Token Acquisition (ConfidentialAuthCodeRequest) started:
Scopes: https://management.azure.com/user_impersonation
Authority Host: login.microsoftonline.com
[11:58:52:666][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[11:58:52:668][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Instance Discovery] Instance discovery is enabled and will be performed
[11:58:52:669][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Region discovery] Not using a regional authority.
[11:58:52:671][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? False.
[11:58:52:672][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Fetching instance discovery from the network from host login.microsoftonline.com.
[11:58:52:675][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting [Oauth2Client] Sending GET request
[11:58:52:677][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting [HttpManager] ExecuteAsync
[11:58:52:680][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:52Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [HttpManager] Sending request. Method: GET. Host: https://login.microsoftonline.com. Binding Certificate: False
[11:58:52:691][Informational] Request [458103d9-05ab-4535-b1e4-a80f52784ab2] GET https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=REDACTED
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-ms-client-request-id:458103d9-05ab-4535-b1e4-a80f52784ab2
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[11:58:53:037][Informational] Response [458103d9-05ab-4535-b1e4-a80f52784ab2] 200 OK (00.3s)
Cache-Control:max-age=86400, private
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
Access-Control-Allow-Origin:REDACTED
Access-Control-Allow-Methods:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:8594d056-0ed7-4479-8a90-eef72632a700
x-ms-ests-server:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 30 Oct 2024 10:58:52 GMT
Content-Type:application/json; charset=utf-8
Content-Length:980
[11:58:53:041][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [HttpManager] Received response. Status code: OK.
[11:58:53:043][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished [HttpManager] ExecuteAsync in 366 ms
[11:58:53:044][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished [Oauth2Client] Sending GET request in 368 ms
[11:58:53:045][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting [OAuth2Client] Deserializing response
[11:58:53:049][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished [OAuth2Client] Deserializing response in 3 ms
[11:58:53:050][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:052][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Instance Discovery] After hitting the discovery endpoint, the network provider found an entry for login.microsoftonline.com ? True.
[11:58:53:058][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Authority validation enabled? True.
[11:58:53:058][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Authority validation - is known env? True.
[11:58:53:062][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting TokenClient:SendTokenRequestAsync
[11:58:53:064][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [TokenClient] Before adding the client assertion / secret
[11:58:53:065][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [TokenClient] After adding the client assertion / secret
[11:58:53:078][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Token Client] Fetching MsalTokenResponse ....
[11:58:53:078][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting [Oauth2Client] Sending POST request
[11:58:53:080][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting [HttpManager] ExecuteAsync
[11:58:53:080][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [HttpManager] Sending request. Method: POST. Host: https://login.microsoftonline.com. Binding Certificate: False
[11:58:53:082][Informational] Request [b4450763-c6b4-4e08-988c-a45659cf3687] POST https://login.microsoftonline.com/5db2e98b-b0c0-410b-bad1-5ea114c68303/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:b4450763-c6b4-4e08-988c-a45659cf3687
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[11:58:53:361][Informational] Response [b4450763-c6b4-4e08-988c-a45659cf3687] 200 OK (00.3s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:d01d8f7a-f517-4730-aed7-cf84ace58100
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 30 Oct 2024 10:58:52 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:4473
[11:58:53:363][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [HttpManager] Received response. Status code: OK.
[11:58:53:367][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished [HttpManager] ExecuteAsync in 287 ms
[11:58:53:367][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished [Oauth2Client] Sending POST request in 289 ms
[11:58:53:367][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Starting [OAuth2Client] Deserializing response
[11:58:53:386][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished [OAuth2Client] Deserializing response in 19 ms
[11:58:53:387][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Finished TokenClient:SendTokenRequestAsync in 325 ms
[11:58:53:388][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Checking client info returned from the server..
[11:58:53:390][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Saving token response to cache..
[11:58:53:393][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6]
[MsalTokenResponse]
Error:
ErrorDescription:
Scopes: https://management.azure.com/user_impersonation
ExpiresIn: 3902
RefreshIn:
AccessToken returned: True
AccessToken Type: Bearer
RefreshToken returned: True
IdToken returned: True
ClientInfo returned: True
FamilyId:
WamAccountId exists: False
[11:58:53:401][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Region discovery] Not using a regional authority.
[11:58:53:402][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:402][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [SaveTokenResponseAsync] Entering token cache semaphore. Count Real semaphore: True. Count: 1.
[11:58:53:403][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [SaveTokenResponseAsync] Entered token cache semaphore.
[11:58:53:403][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [SaveTokenResponseAsync] Saving AT in cache and removing overlapping ATs...
[11:58:53:404][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Looking for scopes for the authority in the cache which intersect with https://management.azure.com/user_impersonation
[11:58:53:405][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z] [Internal cache] Total number of cache partitions found while getting access tokens: 0
[11:58:53:405][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Intersecting scope entries count - 0
[11:58:53:406][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Matching entries after filtering by user - 0
[11:58:53:406][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
[11:58:53:407][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [SaveTokenResponseAsync] Saving RT in cache...
[11:58:53:408][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Not saving to ADAL legacy cache.
[11:58:53:408][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] [SaveTokenResponseAsync] Released token cache semaphore.
[11:58:53:411][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6]
=== Token Acquisition finished successfully:
[11:58:53:413][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] AT expiration time: 30.10.2024 12:03:55 +00:00, scopes: https://management.azure.com/user_impersonation. source: IdentityProvider
[11:58:53:414][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] Fetched access token from host login.microsoftonline.com.
[11:58:53:415][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6]
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 749
[LogMetricsFromAuthResult] DurationInHttpInMs: 641
[11:58:53:416][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - b04b10f7-dd3b-4e07-85dc-d72446ac6cd6] TokenEndpoint: ****
[11:58:53:419][Informational] AuthorizationCodeCredential.GetToken succeeded. Scopes: [ https://management.azure.com/user_impersonation ] ParentRequestId: ExpiresOn: 2024-10-30T12:03:55.3978954+00:00
[11:58:53:422][Informational] AuthorizationCodeCredential.GetToken invoked. Scopes: [ https://database.windows.net/user_impersonation ] ParentRequestId:
[11:58:53:424][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] MSAL MSAL.NetCore with assembly version '4.66.1.0'. CorrelationId(8ef550a6-ec0d-456a-8e70-2e323ad7f07f)
[11:58:53:429][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] === AcquireTokenSilent Parameters ===
[11:58:53:429][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] LoginHint provided: False
[11:58:53:430][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Account provided: True
[11:58:53:430][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] ForceRefresh: False
[11:58:53:430][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f]
=== Request Data ===
Authority Provided? - True
Scopes - https://database.windows.net/user_impersonation
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[11:58:53:431][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] === Token Acquisition (SilentRequest) started:
Scopes: https://database.windows.net/user_impersonation
Authority Host: login.microsoftonline.com
[11:58:53:431][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[11:58:53:433][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Attempting to acquire token using local cache.
[11:58:53:436][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Internal cache] Total number of cache partitions found while getting access tokens: 1
[11:58:53:437][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [FindAccessTokenAsync] Discovered 1 access tokens in cache using partition key: 9c5b26c2-4ebd-4340-9484-7e824a9ef0ec.5db2e98b-b0c0-410b-bad1-5ea114c68303
[11:58:53:438][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering AT by tenant id - item count before: 1
[11:58:53:439][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering AT by tenant id - item count after: 1
[11:58:53:441][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering AT by home account id - item count before: 1
[11:58:53:441][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering AT by home account id - item count after: 1
[11:58:53:442][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering by token type - item count before: 1
[11:58:53:443][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering by token type - item count after: 1
[11:58:53:443][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering by scopes - item count before: 1
[11:58:53:444][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Access token with scopes https://management.azure.com/user_impersonation passes scope filter? False
[11:58:53:445][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering by scopes - item count after: 0
[11:58:53:447][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Not filtering AT by environment, because there are no candidates
[11:58:53:447][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [FindAccessTokenAsync] No tokens found for matching authority, client_id, user and scopes.
[11:58:53:450][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Region discovery] Not using a regional authority.
[11:58:53:450][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:451][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [FOCI] App is not part of the family, skipping FOCI.
[11:58:53:453][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 1
[11:58:53:454][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [FindRefreshTokenAsync] Discovered 1 refresh tokens in cache using key: 9c5b26c2-4ebd-4340-9484-7e824a9ef0ec.5db2e98b-b0c0-410b-bad1-5ea114c68303
[11:58:53:454][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering RT by home account id - item count before: 1
[11:58:53:454][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering RT by home account id - item count after: 1
[11:58:53:454][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering RT by family id - item count before: 1
[11:58:53:455][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering RT by family id - item count after: 1
[11:58:53:455][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering RT by client id - item count before: 1
[11:58:53:455][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Filtering RT by client id - item count after: 1
[11:58:53:459][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Region discovery] Not using a regional authority.
[11:58:53:459][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:461][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [FindRefreshTokenAsync] Refresh token found in the cache? - True
[11:58:53:463][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Refreshing access token...
[11:58:53:463][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Instance Discovery] Instance discovery is enabled and will be performed
[11:58:53:464][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Region discovery] Not using a regional authority.
[11:58:53:464][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:464][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Instance Discovery] The network provider found an entry for login.microsoftonline.com.
[11:58:53:465][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Starting TokenClient:SendTokenRequestAsync
[11:58:53:465][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [TokenClient] Before adding the client assertion / secret
[11:58:53:465][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [TokenClient] After adding the client assertion / secret
[11:58:53:465][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Token Client] Fetching MsalTokenResponse ....
[11:58:53:466][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Starting [Oauth2Client] Sending POST request
[11:58:53:466][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Starting [HttpManager] ExecuteAsync
[11:58:53:466][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [HttpManager] Sending request. Method: POST. Host: https://login.microsoftonline.com. Binding Certificate: False
[11:58:53:466][Informational] Request [22eac4e2-a203-4988-bb49-eda4bef502de] POST https://login.microsoftonline.com/5db2e98b-b0c0-410b-bad1-5ea114c68303/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-anchormailbox:REDACTED
x-client-current-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:22eac4e2-a203-4988-bb49-eda4bef502de
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[11:58:53:762][Informational] Response [22eac4e2-a203-4988-bb49-eda4bef502de] 200 OK (00.3s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:b61d6d99-a468-4972-8545-a082c9498600
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 30 Oct 2024 10:58:53 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:4381
[11:58:53:766][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [HttpManager] Received response. Status code: OK.
[11:58:53:766][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Finished [HttpManager] ExecuteAsync in 300 ms
[11:58:53:767][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Finished [Oauth2Client] Sending POST request in 301 ms
[11:58:53:767][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Starting [OAuth2Client] Deserializing response
[11:58:53:767][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Finished [OAuth2Client] Deserializing response in 0 ms
[11:58:53:767][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Finished TokenClient:SendTokenRequestAsync in 302 ms
[11:58:53:768][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Checking client info returned from the server..
[11:58:53:769][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Saving token response to cache..
[11:58:53:769][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f]
[MsalTokenResponse]
Error:
ErrorDescription:
Scopes: https://database.windows.net/user_impersonation
ExpiresIn: 3994
RefreshIn:
AccessToken returned: True
AccessToken Type: Bearer
RefreshToken returned: True
IdToken returned: True
ClientInfo returned: True
FamilyId:
WamAccountId exists: False
[11:58:53:770][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Region discovery] Not using a regional authority.
[11:58:53:770][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:771][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [SaveTokenResponseAsync] Entering token cache semaphore. Count Real semaphore: True. Count: 1.
[11:58:53:771][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [SaveTokenResponseAsync] Entered token cache semaphore.
[11:58:53:771][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [SaveTokenResponseAsync] Saving AT in cache and removing overlapping ATs...
[11:58:53:771][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Looking for scopes for the authority in the cache which intersect with https://database.windows.net/user_impersonation
[11:58:53:771][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z] [Internal cache] Total number of cache partitions found while getting access tokens: 1
[11:58:53:772][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Intersecting scope entries count - 0
[11:58:53:772][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Matching entries after filtering by user - 0
[11:58:53:773][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
[11:58:53:773][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [SaveTokenResponseAsync] Saving RT in cache...
[11:58:53:773][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Not saving to ADAL legacy cache.
[11:58:53:773][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] [SaveTokenResponseAsync] Released token cache semaphore.
[11:58:53:774][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f]
=== Token Acquisition finished successfully:
[11:58:53:774][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] AT expiration time: 30.10.2024 12:05:27 +00:00, scopes: https://database.windows.net/user_impersonation. source: IdentityProvider
[11:58:53:775][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] Fetched access token from host login.microsoftonline.com.
[11:58:53:775][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f]
[LogMetricsFromAuthResult] Cache Refresh Reason: NoCachedAccessToken
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 345
[LogMetricsFromAuthResult] DurationInHttpInMs: 299
[11:58:53:776][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 8ef550a6-ec0d-456a-8e70-2e323ad7f07f] TokenEndpoint: ****
[11:58:53:777][Informational] AuthorizationCodeCredential.GetToken succeeded. Scopes: [ https://database.windows.net/user_impersonation ] ParentRequestId: ExpiresOn: 2024-10-30T12:05:27.7701156+00:00
[11:58:53:803][Informational] AuthorizationCodeCredential.GetToken invoked. Scopes: [ https://management.azure.com//.default ] ParentRequestId: ee6242d3-c668-41c2-b3cc-f7a618a0e7ed
[11:58:53:803][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z] ConfidentialClientApplication 24828593 created
[11:58:53:804][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] MSAL MSAL.NetCore with assembly version '4.66.1.0'. CorrelationId(a8964989-5aee-4f66-adf3-e83e75857d3c)
[11:58:53:806][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] === AcquireTokenSilent Parameters ===
[11:58:53:806][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] LoginHint provided: False
[11:58:53:806][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Account provided: True
[11:58:53:806][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] ForceRefresh: False
[11:58:53:806][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - a8964989-5aee-4f66-adf3-e83e75857d3c
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[11:58:53:807][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] === Token Acquisition (SilentRequest) started:
Scopes: https://management.azure.com//.default
Authority Host: login.microsoftonline.com
[11:58:53:807][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[11:58:53:809][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Attempting to acquire token using local cache.
[11:58:53:809][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [Internal cache] Total number of cache partitions found while getting access tokens: 0
[11:58:53:809][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindAccessTokenAsync] Discovered 0 access tokens in cache using partition key: 9c5b26c2-4ebd-4340-9484-7e824a9ef0ec.5db2e98b-b0c0-410b-bad1-5ea114c68303
[11:58:53:810][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindAccessTokenAsync] No access tokens found in the cache. Skipping filtering.
[11:58:53:810][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [Region discovery] Not using a regional authority.
[11:58:53:810][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:811][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] No app metadata found. Returning unknown.
[11:58:53:811][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FOCI] App is part of the family or unknown, looking for FRT.
[11:58:53:812][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0
[11:58:53:812][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindRefreshTokenAsync] Discovered 0 refresh tokens in cache using key: 9c5b26c2-4ebd-4340-9484-7e824a9ef0ec.5db2e98b-b0c0-410b-bad1-5ea114c68303
[11:58:53:816][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindRefreshTokenAsync] No RTs found in the MSAL cache
[11:58:53:816][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindRefreshTokenAsync] Checking ADAL cache for matching RT.
[11:58:53:817][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FOCI] FRT found? False
[11:58:53:817][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0
[11:58:53:817][LogAlways] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindRefreshTokenAsync] Discovered 0 refresh tokens in cache using key: 9c5b26c2-4ebd-4340-9484-7e824a9ef0ec.5db2e98b-b0c0-410b-bad1-5ea114c68303
[11:58:53:817][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindRefreshTokenAsync] No RTs found in the MSAL cache
[11:58:53:818][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] [FindRefreshTokenAsync] Checking ADAL cache for matching RT.
[11:58:53:818][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] No Refresh Token was found in the cache.
[11:58:53:819][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Refreshing the RT failed. Is the exception retryable? False. Is there an AT in the cache that is usable? False
[11:58:53:819][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Failed to refresh the RT and cannot use existing AT (expired or missing).
[11:58:53:819][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Token cache could not satisfy silent request.
[11:58:53:836][Error] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - a8964989-5aee-4f66-adf3-e83e75857d3c] Exception type: Microsoft.Identity.Client.MsalUiRequiredException
, ErrorCode: no_tokens_found
HTTP StatusCode 0
CorrelationId a8964989-5aee-4f66-adf3-e83e75857d3c
To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging
at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
[11:58:53:838][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] MSAL MSAL.NetCore with assembly version '4.66.1.0'. CorrelationId(24fe147b-b53f-455e-a3e0-ef6921438c2f)
[11:58:53:839][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenByAuthorizationCode
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 24fe147b-b53f-455e-a3e0-ef6921438c2f
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[11:58:53:839][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] === Token Acquisition (ConfidentialAuthCodeRequest) started:
Scopes: https://management.azure.com//.default
Authority Host: login.microsoftonline.com
[11:58:53:840][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[11:58:53:840][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [Instance Discovery] Instance discovery is enabled and will be performed
[11:58:53:840][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [Region discovery] Not using a regional authority.
[11:58:53:840][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True.
[11:58:53:841][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [Instance Discovery] The network provider found an entry for login.microsoftonline.com.
[11:58:53:841][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Starting TokenClient:SendTokenRequestAsync
[11:58:53:842][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [TokenClient] Before adding the client assertion / secret
[11:58:53:842][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [TokenClient] After adding the client assertion / secret
[11:58:53:842][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [Token Client] Fetching MsalTokenResponse ....
[11:58:53:843][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Starting [Oauth2Client] Sending POST request
[11:58:53:843][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Starting [HttpManager] ExecuteAsync
[11:58:53:843][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:53Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [HttpManager] Sending request. Method: POST. Host: https://login.microsoftonline.com. Binding Certificate: False
[11:58:53:844][Informational] Request [a0725281-2095-4744-a560-b316b7eb445c] POST https://login.microsoftonline.com/5db2e98b-b0c0-410b-bad1-5ea114c68303/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:a0725281-2095-4744-a560-b316b7eb445c
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[11:58:54:133][Warning] Error response [a0725281-2095-4744-a560-b316b7eb445c] 400 Bad Request (00.3s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:e24fa81c-d16c-465d-9179-996c9e086a00
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 30 Oct 2024 10:58:53 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:472
[11:58:54:135][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [HttpManager] Received response. Status code: BadRequest.
[11:58:54:135][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Finished [HttpManager] ExecuteAsync in 292 ms
[11:58:54:135][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Response status code does not indicate success: 400 (BadRequest).
[11:58:54:136][Warning] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Request retry failed.
[11:58:54:136][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Finished [Oauth2Client] Sending POST request in 294 ms
[11:58:54:136][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] [Oauth2Client] Processing error response
[11:58:54:138][Informational] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] HttpStatusCode: 400: BadRequest
[11:58:54:140][Error] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] === Token Acquisition (1000) failed.
Host: login.microsoftonline.com.
[11:58:54:140][Error] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Exception type: Microsoft.Identity.Client.MsalUiRequiredException
, ErrorCode: invalid_grant
HTTP StatusCode 400
CorrelationId 24fe147b-b53f-455e-a3e0-ef6921438c2f
Microsoft Entra ID Error Code AADSTS54005
To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging
[11:58:54:143][Verbose] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Finished TokenClient:SendTokenRequestAsync in 302 ms
[11:58:54:145][Error] False MSAL 4.66.1.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-30 10:58:54Z - 24fe147b-b53f-455e-a3e0-ef6921438c2f] Exception type: Microsoft.Identity.Client.MsalUiRequiredException
, ErrorCode: invalid_grant
HTTP StatusCode 400
CorrelationId 24fe147b-b53f-455e-a3e0-ef6921438c2f
Microsoft Entra ID Error Code AADSTS54005
To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ThrowServerException(HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.CreateResponse[T](HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ExecuteRequestAsync[T](Uri endPoint, HttpMethod method, RequestContext requestContext, Boolean expectErrorsOn200OK, Boolean addCommonHeaders, Func`2 onBeforePostRequestData)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.ConfidentialAuthCodeRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
[11:58:54:149][Informational] AuthorizationCodeCredential.GetToken was unable to retrieve an access token. Scopes: [ https://management.azure.com//.default ] ParentRequestId: ee6242d3-c668-41c2-b3cc-f7a618a0e7ed Exception: Azure.Identity.AuthenticationFailedException (0x80131500): AuthorizationCodeCredential authentication failed:
---> Microsoft.Identity.Client.MsalUiRequiredException (0x80131500): AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: e24fa81c-d16c-465d-9179-996c9e086a00 Correlation ID: 24fe147b-b53f-455e-a3e0-ef6921438c2f Timestamp: 2024-10-30 10:58:53Z
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
Azure.Identity.AuthenticationFailedException: AuthorizationCodeCredential authentication failed:
---> MSAL.NetCore.4.66.1.0.MsalUiRequiredException:
ErrorCode: invalid_grant
Microsoft.Identity.Client.MsalUiRequiredException: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: e24fa81c-d16c-465d-9179-996c9e086a00 Correlation ID: 24fe147b-b53f-455e-a3e0-ef6921438c2f Timestamp: 2024-10-30 10:58:53Z
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ThrowServerException(HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.CreateResponse[T](HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ExecuteRequestAsync[T](Uri endPoint, HttpMethod method, RequestContext requestContext, Boolean expectErrorsOn200OK, Boolean addCommonHeaders, Func`2 onBeforePostRequestData)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.ConfidentialAuthCodeRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenByAuthorizationCodeParameters authorizationCodeParameters, CancellationToken cancellationToken)
at Azure.Identity.AbstractAcquireTokenParameterBuilderExtensions.ExecuteAsync[T](AbstractAcquireTokenParameterBuilder`1 builder, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalConfidentialClient.AcquireTokenByAuthorizationCodeCoreAsync(String[] scopes, String code, String tenantId, String redirectUri, String claims, Boolean enableCae, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalConfidentialClient.AcquireTokenByAuthorizationCodeAsync(String[] scopes, String code, String tenantId, String redirectUri, String claims, Boolean enableCae, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.AuthorizationCodeCredential.AcquireTokenWithCode(Boolean async, TokenRequestContext requestContext, String tenantId, CancellationToken cancellationToken)
at Azure.Identity.AuthorizationCodeCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
StatusCode: 400
ResponseBody: {"error":"invalid_grant","error_description":"AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: e24fa81c-d16c-465d-9179-996c9e086a00 Correlation ID: 24fe147b-b53f-455e-a3e0-ef6921438c2f Timestamp: 2024-10-30 10:58:53Z","error_codes":[54005],"timestamp":"2024-10-30 10:58:53Z","trace_id":"e24fa81c-d16c-465d-9179-996c9e086a00","correlation_id":"24fe147b-b53f-455e-a3e0-ef6921438c2f"}
Headers: Cache-Control: no-store, no-cache
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
client-request-id: 24fe147b-b53f-455e-a3e0-ef6921438c2f
x-ms-request-id: e24fa81c-d16c-465d-9179-996c9e086a00
x-ms-ests-server: 2.1.19267.5 - NEULR1 ProdSlices
x-ms-clitelem: 1,54005,0,,
x-ms-srs: 1.P
X-XSS-Protection: 0
Set-Cookie: <redacted>
Date: Wed, 30 Oct 2024 10:58:53 GMT
--- End of inner exception stack trace ---
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage, Boolean isCredentialUnavailable)
at Azure.Identity.AuthorizationCodeCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Identity.AuthorizationCodeCredential.GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.SetResultOnTcsFromCredentialAsync(TokenRequestContext context, TaskCompletionSource`1 targetTcs, Boolean async, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetAuthHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](Task`1 task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.TokenRequestState.GetCurrentHeaderValue(Boolean async, Boolean checkForCompletion, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetAuthHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AuthenticateAndAuthorizeRequest(HttpMessage message, TokenRequestContext context)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AuthorizeRequest(HttpMessage message)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.RedirectPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken)
at Azure.Core.PageableHelpers.PageableImplementation`1.GetNextResponse(Nullable`1 pageSizeHint, String nextLink)
at Azure.Core.PageableHelpers.PageableImplementation`1.GetEnumerator()+MoveNext()
at AzureIdentityExample.Components.Pages.Home.OnParametersSetAsync() in C:\Users\BørgeAndréJensen\contracting-experiments\source\AzureIdentityExample\Components\Pages\Home.razor:line 76
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.WaitForResultReady(Boolean waitForQuiescence, PrerenderedComponentHtmlContent result)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.RenderEndpointComponent(HttpContext httpContext, Type rootComponentType, ParameterView parameters, Boolean waitForQuiescence)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Thanks for the log info @imborge It's not clear to me why this behavior has changed. Which version of Azure.Identity were you using where this worked? Could you possibly provide the same logging for a repro using that version so that we can compare them?
Hi @imborge. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
I previously used Azure.Identity 1.12.1 @christothes. This is the output after downgrading to 1.12.1:
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:7106
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5067
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\BørgeAndréJensen\contracting-experiments\source\AzureIdentityExample
[17:03:58:136][Informational] AuthorizationCodeCredential.GetToken invoked. Scopes: [ https://management.azure.com/user_impersonation ] ParentRequestId:
[17:03:58:210][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] MSAL MSAL.NetCore with assembly version '4.65.0.0'. CorrelationId(d376a608-4955-4785-afd9-cb833bbe9770)
[17:03:58:222][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com/user_impersonation
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenByAuthorizationCode
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - d376a608-4955-4785-afd9-cb833bbe9770
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[17:03:58:225][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] === Token Acquisition (ConfidentialAuthCodeRequest) started:
Scopes: https://management.azure.com/user_impersonation
Authority Host: login.microsoftonline.com
[17:03:58:227][Warning] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[17:03:58:230][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] [Instance Discovery] Instance discovery is enabled and will be performed
[17:03:58:231][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] [Region discovery] Not using a regional authority.
[17:03:58:235][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] Fetching instance discovery from the network from host login.microsoftonline.com.
[17:03:58:260][Informational] Request [f39cfd7f-72d6-4226-9396-c7384b05540d] GET https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=REDACTED
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-ms-client-request-id:f39cfd7f-72d6-4226-9396-c7384b05540d
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.12.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[17:03:58:643][Informational] Response [f39cfd7f-72d6-4226-9396-c7384b05540d] 200 OK (00.4s)
Cache-Control:max-age=86400, private
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
Access-Control-Allow-Origin:REDACTED
Access-Control-Allow-Methods:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:b9e145f4-1707-4e2d-9514-be3fb5b30200
x-ms-ests-server:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Thu, 31 Oct 2024 16:03:58 GMT
Content-Type:application/json; charset=utf-8
Content-Length:980
[17:03:58:665][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] Authority validation enabled? True.
[17:03:58:665][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:58Z - d376a608-4955-4785-afd9-cb833bbe9770] Authority validation - is known env? True.
[17:03:58:697][Informational] Request [84d1b515-bb71-416f-8c43-d6a708264e3d] POST https://login.microsoftonline.com/5db2e98b-b0c0-410b-bad1-5ea114c68303/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:84d1b515-bb71-416f-8c43-d6a708264e3d
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.12.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[17:03:58:969][Informational] Response [84d1b515-bb71-416f-8c43-d6a708264e3d] 200 OK (00.3s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:525b17bd-edd5-45f9-8a73-a0b287311400
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Thu, 31 Oct 2024 16:03:58 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:4485
[17:03:59:005][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] Checking client info returned from the server..
[17:03:59:007][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] Saving token response to cache..
[17:03:59:022][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] [Region discovery] Not using a regional authority.
[17:03:59:022][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] [SaveTokenResponseAsync] Saving AT in cache and removing overlapping ATs...
[17:03:59:023][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] Looking for scopes for the authority in the cache which intersect with https://management.azure.com/user_impersonation
[17:03:59:030][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] Intersecting scope entries count - 0
[17:03:59:031][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] Matching entries after filtering by user - 0
[17:03:59:031][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
[17:03:59:032][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] [SaveTokenResponseAsync] Saving RT in cache...
[17:03:59:035][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770]
=== Token Acquisition finished successfully:
[17:03:59:038][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] AT expiration time: 31.10.2024 17:25:16 +00:00, scopes: https://management.azure.com/user_impersonation. source: IdentityProvider
[17:03:59:042][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - d376a608-4955-4785-afd9-cb833bbe9770] Fetched access token from host login.microsoftonline.com.
[17:03:59:051][Informational] AuthorizationCodeCredential.GetToken succeeded. Scopes: [ https://management.azure.com/user_impersonation ] ParentRequestId: ExpiresOn: 2024-10-31T17:25:16.0157371+00:00
[17:03:59:055][Informational] AuthorizationCodeCredential.GetToken invoked. Scopes: [ https://database.windows.net/user_impersonation ] ParentRequestId:
[17:03:59:060][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] MSAL MSAL.NetCore with assembly version '4.65.0.0'. CorrelationId(40a27ca1-9cf5-43d8-a5f4-341ec0eed1db)
[17:03:59:061][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] === AcquireTokenSilent Parameters ===
[17:03:59:061][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] LoginHint provided: False
[17:03:59:061][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Account provided: True
[17:03:59:061][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] ForceRefresh: False
[17:03:59:062][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db]
=== Request Data ===
Authority Provided? - True
Scopes - https://database.windows.net/user_impersonation
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[17:03:59:063][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] === Token Acquisition (SilentRequest) started:
Scopes: https://database.windows.net/user_impersonation
Authority Host: login.microsoftonline.com
[17:03:59:063][Warning] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[17:03:59:081][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [Region discovery] Not using a regional authority.
[17:03:59:087][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [Region discovery] Not using a regional authority.
[17:03:59:088][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [FindRefreshTokenAsync] Refresh token found in the cache? - True
[17:03:59:089][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [Instance Discovery] Instance discovery is enabled and will be performed
[17:03:59:090][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [Region discovery] Not using a regional authority.
[17:03:59:092][Informational] Request [a52341b3-5c44-486e-8571-975cd085578e] POST https://login.microsoftonline.com/5db2e98b-b0c0-410b-bad1-5ea114c68303/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-anchormailbox:REDACTED
x-client-current-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:a52341b3-5c44-486e-8571-975cd085578e
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.12.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[17:03:59:306][Informational] Response [a52341b3-5c44-486e-8571-975cd085578e] 200 OK (00.2s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:6532812b-a026-4c2b-b2e7-324c3c931100
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Thu, 31 Oct 2024 16:03:58 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:4391
[17:03:59:310][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Checking client info returned from the server..
[17:03:59:310][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Saving token response to cache..
[17:03:59:311][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [Region discovery] Not using a regional authority.
[17:03:59:311][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [SaveTokenResponseAsync] Saving AT in cache and removing overlapping ATs...
[17:03:59:312][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Looking for scopes for the authority in the cache which intersect with https://database.windows.net/user_impersonation
[17:03:59:312][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Intersecting scope entries count - 0
[17:03:59:313][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Matching entries after filtering by user - 0
[17:03:59:313][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
[17:03:59:313][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] [SaveTokenResponseAsync] Saving RT in cache...
[17:03:59:314][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db]
=== Token Acquisition finished successfully:
[17:03:59:314][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] AT expiration time: 31.10.2024 17:24:57 +00:00, scopes: https://database.windows.net/user_impersonation. source: IdentityProvider
[17:03:59:314][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 40a27ca1-9cf5-43d8-a5f4-341ec0eed1db] Fetched access token from host login.microsoftonline.com.
[17:03:59:316][Informational] AuthorizationCodeCredential.GetToken succeeded. Scopes: [ https://database.windows.net/user_impersonation ] ParentRequestId: ExpiresOn: 2024-10-31T17:24:57.3111427+00:00
[17:03:59:394][Informational] AuthorizationCodeCredential.GetToken invoked. Scopes: [ https://management.azure.com//.default ] ParentRequestId: 1669d133-7d2d-4380-b76f-c369cd367366
[17:03:59:395][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] MSAL MSAL.NetCore with assembly version '4.65.0.0'. CorrelationId(8637bbe8-ab83-4a57-91c9-ab3d8df2164f)
[17:03:59:396][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] === AcquireTokenSilent Parameters ===
[17:03:59:396][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] LoginHint provided: False
[17:03:59:396][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Account provided: True
[17:03:59:396][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] ForceRefresh: False
[17:03:59:397][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - True
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
[17:03:59:398][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] === Token Acquisition (SilentRequest) started:
Scopes: https://management.azure.com//.default
Authority Host: login.microsoftonline.com
[17:03:59:398][Warning] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Only in-memory caching is used. The cache is not persisted and will be lost if the machine is restarted. It also does not scale for a web app or web API, where the number of users can grow large. In production, web apps and web APIs should use distributed caching like Redis. See https://aka.ms/msal-net-cca-token-cache-serialization
[17:03:59:399][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [Region discovery] Not using a regional authority.
[17:03:59:399][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [Region discovery] Not using a regional authority.
[17:03:59:399][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [FindRefreshTokenAsync] Refresh token found in the cache? - True
[17:03:59:399][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [Instance Discovery] Instance discovery is enabled and will be performed
[17:03:59:400][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [Region discovery] Not using a regional authority.
[17:03:59:400][Informational] Request [cfa129a7-c218-4df7-b6d5-176ad84520e5] POST https://login.microsoftonline.com/5db2e98b-b0c0-410b-bad1-5ea114c68303/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-anchormailbox:REDACTED
x-client-current-telemetry:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:cfa129a7-c218-4df7-b6d5-176ad84520e5
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.12.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
client assembly: Azure.Identity
[17:03:59:810][Informational] Response [cfa129a7-c218-4df7-b6d5-176ad84520e5] 200 OK (00.4s)
Cache-Control:no-store, no-cache
Pragma:no-cache
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:6532812b-a026-4c2b-b2e7-324c43931100
x-ms-ests-server:REDACTED
x-ms-clitelem:REDACTED
x-ms-srs:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Thu, 31 Oct 2024 16:03:59 GMT
Content-Type:application/json; charset=utf-8
Expires:-1
Content-Length:4528
[17:03:59:812][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Checking client info returned from the server..
[17:03:59:812][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Saving token response to cache..
[17:03:59:813][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [Region discovery] Not using a regional authority.
[17:03:59:813][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [SaveTokenResponseAsync] Saving AT in cache and removing overlapping ATs...
[17:03:59:813][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Looking for scopes for the authority in the cache which intersect with https://management.azure.com//.default
[17:03:59:814][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Intersecting scope entries count - 0
[17:03:59:814][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Matching entries after filtering by user - 0
[17:03:59:814][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
[17:03:59:814][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] [SaveTokenResponseAsync] Saving RT in cache...
[17:03:59:815][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f]
=== Token Acquisition finished successfully:
[17:03:59:815][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] AT expiration time: 31.10.2024 17:25:17 +00:00, scopes: https://management.azure.com//.default https://management.azure.com//user_impersonation. source: IdentityProvider
[17:03:59:815][Informational] False MSAL 4.65.0.0 MSAL.NetCore .NET 8.0.0 Microsoft Windows 10.0.19045 [2024-10-31 16:03:59Z - 8637bbe8-ab83-4a57-91c9-ab3d8df2164f] Fetched access token from host login.microsoftonline.com.
[17:03:59:816][Informational] AuthorizationCodeCredential.GetToken succeeded. Scopes: [ https://management.azure.com//.default ] ParentRequestId: 1669d133-7d2d-4380-b76f-c369cd367366 ExpiresOn: 2024-10-31T17:25:17.8133130+00:00
[17:03:59:819][Informational] Request [1669d133-7d2d-4380-b76f-c369cd367366] GET https://management.azure.com/subscriptions/9c30d448-14f2-4473-ac7a-8d1939e87d7a/resourceGroups/TestDev/providers/Microsoft.Sql/servers/cw-db-elastic-test/elasticPools?api-version=2021-08-01-preview
Accept:application/json
x-ms-client-request-id:1669d133-7d2d-4380-b76f-c369cd367366
x-ms-return-client-request-id:true
User-Agent:azsdk-net-ResourceManager.Sql/1.2.1 (.NET 8.0.0; Microsoft Windows 10.0.19045)
Authorization:REDACTED
client assembly: Azure.ResourceManager
[17:04:00:527][Informational] Response [1669d133-7d2d-4380-b76f-c369cd367366] 200 OK (00.7s)
Cache-Control:no-cache
Pragma:no-cache
x-ms-request-id:52ad5096-df12-4b80-b52a-be0d912b0b0a
x-ms-ratelimit-remaining-subscription-reads:REDACTED
x-ms-ratelimit-remaining-subscription-global-reads:REDACTED
x-ms-correlation-request-id:REDACTED
x-ms-routing-request-id:REDACTED
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
X-Cache:REDACTED
X-MSEdge-Ref:REDACTED
Date:Thu, 31 Oct 2024 16:03:59 GMT
Content-Length:711
Content-Type:application/json; charset=utf-8
Expires:-1
/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.Sql/servers/<redacted>/elasticPools/<redacted>
Library name and version
Azure.Identity 1.13.0 Azure.ResourceManager 1.13.0 Azure.ResourceManager.Resources 1.9.0 Azure.ResourceManager.Sql 1.2.1
Describe the bug
When using
ArmClient
with anAuthorizationCodeCredential
that has already reedemed the authorization code to list elastic pools, I get an error saying:This worked (did not throw this exception) prior to upgrading to Azure.Identity 1.13.0
Expected behavior
Get the list of elasic pools
Actual behavior
Throws an exception:
Reproduction Steps
Code example (Blazor Web app project):
Environment