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

Authentication provider for 'Active Directory Interactive' should maintain access token cache globally #989

Closed
Rookian opened this issue Mar 16, 2021 · 1 comment · Fixed by #1043

Comments

@Rookian
Copy link

Rookian commented Mar 16, 2021

Is your feature request related to a problem? Please describe.

For now we have used Azure CLI and Azure.Identity to use AAD authentication when working locally. We used 'az login' and we could then start and restart several of our services without logging in again and again.
With this solution we have had to gain an access token for a SqlConnection manually.

With the new Authentication provider 'Active Directory Interactive' we don't need to take care of access token handling anymore.
Unfortunately we now have to login every time we start a service. So it seems like that the access token is cached within the current application instance.
We can't use 'Active Directory Integrated', because of MFA.

Describe the solution you'd like

It would be nice when 'Active Directory Interactive' would work like Azure CLI (az login) where we just have to login once for a while.

e.g. When I run 2 or more applications at once or I restart my application(s), I only want to login once.

@cheenamalhotra
Copy link
Member

Hi @Rookian

This has been considered with issue #616 where we will bring in direct support of Azure.Identity and a new option would be provided to fetch "DefaultAzureCredential" from client environment.

In the mean time, you can follow this approach: #730 (comment) with latest Microsoft.Data.SqlClient driver.

Since we're tracking this change with #616, is there anything else you'd need help with?

@cheenamalhotra cheenamalhotra added this to To do in SqlClient v3.0 via automation Apr 20, 2021
@cheenamalhotra cheenamalhotra moved this from To do to In Progress in SqlClient v3.0 Apr 20, 2021
@cheenamalhotra cheenamalhotra moved this from In Progress to Review In Progress in SqlClient v3.0 May 15, 2021
SqlClient v3.0 automation moved this from Review In Progress to Done May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants