-
Notifications
You must be signed in to change notification settings - Fork 299
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
Driver sending expired token intermittently during Azure login #2238
Comments
We'll discuss it on the next bug triage ;) |
We have been seeing this exception a lot in our environments. However, I wonder if this will fix one of our cases. Sometimes we get this exception when we swap a staging slot out in production on our Azure App Services. My guess (I think someone verified this somewhere, but I can't find that issue/comment atm) is that the staging slot, after swapped and now being the prod slot) still uses the staging slot identity when retrieving an access token. Did #2273 only fix the issue that the token is not always refreshed after being expired or might my issue have been resolved as well? |
I see this issue has been fixed in the 5.2.0 release, but I'm still seeing these errors even after updating. The errors always happen when the application is running longer than 24 hours, and the error messages match, so I expect it's the same token renew issue. Can this be re-opened? |
@tompazourek This issue was for an intermittent issue. Since yours is consistent after 24 hours, it's likely different. File a new issue with all details (particularly exception stack, connection string authentication options, and, if you aren't using built-in authentication, details of how you are obtaining / managing access tokens). |
Describe the bug
Intermittently received error
Login failed for user '<token-identified principal>
. The same user can login with the same token again.I think what's happening is that while MSAL is working on renewing access token, ActiveDirectoryAuthenticationTimeoutRetryHelper is picking up an expired token it finds in cache.
I gathered log here that may be helpful to figure out what's acting in between:
Expand for logs (for error scenario)
Expand for logs (for successful scenario)
Microsoft.Data.SqlClient version: 5.1.1
.NET 7
Similar issue: #970
The text was updated successfully, but these errors were encountered: