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

ADAL v3 #50

Open
pjt33 opened this issue Apr 16, 2019 · 2 comments
Open

ADAL v3 #50

pjt33 opened this issue Apr 16, 2019 · 2 comments

Comments

@pjt33
Copy link

pjt33 commented Apr 16, 2019

Are there any plans to support ADAL v3?

The Microsoft.Azure.Management.*.Fluent packages depend on Microsoft.Rest.ClientRuntime.Azure.Authentication, which depends on Microsoft.IdentityModel.Clients.ActiveDirectory version 2.x under .Net Framework 4.5.2 but version 3.x under .Net Framework 4.6.1.

Since .Net Framework 4.5.2 is the very oldest framework not yet to be out of support, it seems a bit risky to target it. But the API change between Microsoft.IdentityModel.Clients.ActiveDirectory 2.x and 3.x breaks ARMClient quite badly: all of the methods it uses from AuthenticationContext are either renamed or removed.

Half of the problems are easily handled by shimming the missing AcquireToken methods with extension methods which call AcquireTokenAsync, but the other half are due to ADAL v3 not exposing refresh tokens. AIUI AcquireTokenSilentAsync is supposed to replace AcquireTokenByRefreshTokenAsync, but I don't understand ADAL well enough to be confident in writing a patch for this.

@suwatch
Copy link
Member

suwatch commented Oct 25, 2019

Is there any scenario we are missing and require ADAL v3?

@pjt33
Copy link
Author

pjt33 commented Oct 25, 2019

The scenario is using ARMClient to acquire tokens for use with the current Azure management libraries and .Net framework. Strictly speaking it can be done without ADAL v3 by doing complicated hacks to load one version of Microsoft.IdentityModel.Clients.ActiveDirectory into one appdomain for token acquisition and another version into a different appdomain for the Azure management, but that's not exactly KISS.

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

No branches or pull requests

2 participants