Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] If refresh token is not in cache, log warnings are produced on AcquireTokenSilent #4988

Open
bgavrilMS opened this issue Nov 7, 2024 · 0 comments

Comments

@bgavrilMS
Copy link
Member

Library version used

4.66.1

.NET version

net8

Scenario

ConfidentialClient - web site (AcquireTokenByAuthCode)

Is this a new or an existing app?

None

Issue description and reproduction steps

cca.AcquireTokenSilent(scopes, Account) when no RT is in the cache

Actual logs:

[11:58:53:807][Informational] False MSAL 4.66.1.0 [a8964989-5aee-4f66-adf3-e83e75857d3c] === Token Acquisition (SilentRequest) started:
         Scopes: https://management.azure.com//.default
        Authority Host: login.microsoftonline.com
[11:58:53:810][Informational] False MSAL 4.66.1.0 [a8964989-5aee-4f66-adf3-e83e75857d3c] [Region discovery] Not using a regional authority.
[11:58:53:811][Warning] False MSAL 4.66.1.0 [a8964989-5aee-4f66-adf3-e83e75857d3c] No app metadata found. Returning unknown.
[11:58:53:819][Warning] False MSAL 4.66.1.0 [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 [a8964989-5aee-4f66-adf3-e83e75857d3c] Failed to refresh the RT and cannot use existing AT (expired or missing).
[11:58:53:836][Error] False MSAL 4.66.1.0 [a8964989-5aee-4f66-adf3-e83e75857d3c] Exception type: Microsoft.Identity.Client.MsalUiRequiredException
, ErrorCode: no_tokens_found

Expected: It should be clearer that there is no RT in the cache and no warnings should be there.

Relevant code snippets

No response

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

@bgavrilMS bgavrilMS added untriaged Do not delete. Needed for Automation needs attention Delete label after triage bug P2 confidential-client and removed untriaged Do not delete. Needed for Automation needs attention Delete label after triage labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant