Skip to content

Conversation

cheenamalhotra
Copy link
Member

@cheenamalhotra cheenamalhotra commented Jul 6, 2020

Fixes #617

When federated authentication mode is used, the driver continues to re-use pooled connection even if associated access token is expired. This leads to failures on client environments when Azure DB re-validates credentials after 10 hours (as of now), and physical connection ends up no longer usable.

This PR fixes the behavior and does not let the pooled connection be re-used again if associated access token is due expire soon.

NuGet package for testing is available here:
https://dev.azure.com/sqlclientdrivers-ci/sqlclient/_build/results?buildId=13352&view=artifacts&type=publishedArtifacts

@cheenamalhotra cheenamalhotra merged commit ebde504 into dotnet:master Jul 21, 2020
@PouyaPanahy
Copy link

Hi,
What about the cases when using AAD-Integrated Authentication? Would the PR solve my problem too?

@JRahnama
Copy link
Contributor

JRahnama commented Oct 2, 2020

@PouyaPanahy, If your case matches the underlying issue, yes. (AAD Integrated Authentication uses access tokens.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Login failed for user ***. Token is expired." when using Azure Active Directory password authentication

5 participants