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

Azure AD Support (SqlConnection.AccessToken) #1604

Closed
ghost opened this issue Feb 12, 2019 · 3 comments
Closed

Azure AD Support (SqlConnection.AccessToken) #1604

ghost opened this issue Feb 12, 2019 · 3 comments
Assignees
Labels
status: has-pr There is active PR for issue type: feature
Milestone

Comments

@ghost
Copy link

ghost commented Feb 12, 2019

Please could you add support for using Azure AD authentication by allowing the setting of the SqlConnection.AccessToken property before the connection is opened.

The easiest way may be to just have a protected virtual method like BeforeOpen() which is called before the connection is first opened. One could then just override that method to request and set the access token.

@MaceWindu
Copy link
Contributor

I think you can try to use DataConnection constructor with connectionFactory parameter as workaround for now.

@ghost
Copy link
Author

ghost commented Feb 12, 2019

Does the trick, thanks!

@GonzoSpire GonzoSpire pinned this issue Feb 13, 2019
@GonzoSpire GonzoSpire unpinned this issue Feb 13, 2019
GonzoSpire added a commit that referenced this issue Feb 14, 2019
@MaceWindu MaceWindu added status: has-pr There is active PR for issue and removed provider: mssql labels Feb 14, 2019
MaceWindu pushed a commit that referenced this issue Feb 16, 2019
* Add Event  OnBeforeConnectionOpen & OnBeforeConnectionOpenAsync

fix and tests for issue #1604

* fix tests and help
@MaceWindu
Copy link
Contributor

#3939 adds new option to do it without custom connection factory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has-pr There is active PR for issue type: feature
Development

No branches or pull requests

2 participants