-
Notifications
You must be signed in to change notification settings - Fork 345
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
MsalUIRequiredException in 2.7.1 library on iOS 12.1.4 using Safari when calling AcquireTokenForClientAsync #1073
Comments
The issue seems similar to the Security Advisory mentioned by ASP.NET, have you tried the workout around listed in this GitHub issue? In addition to the above, I would suggest updating to the latest version of MSAL (3.0.4-preview). Specifically on using confidential clients. Also, when looking at the code shared, it’s a little confusing as to what you're trying to do. In the flow you’re using, you try to use a user token cache, but you should be using the app cache. Spend some time going through these tutorials, which are really good and have examples of best practices: If you want to call AcquireToken for a client, this is a daemon scenario. In that case, you don’t need a cache, as the daemon does the caching itself. You can use an application cache, but not a user cache. Since you're B2C, they might be interested in this tutorial which is an ASP.NET Core web app. https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapp Also, by updating to 3.0.4-preview, you’ll get some of the latest fixes for b2c (handling custom domains) and iOS (MSAL now initializes an HttpClient with NsUrlSessionHandler() for iOS 7+). Once you’ve updated and fixed any issues in the code, please send us the logs using the latest MSAL build. |
@RayGHeld this was resolved correct? |
Which Version of MSAL are you using ?
Note that to get help, you need to run the latest version. Preview version are also ok.
For ADAL, please log issues to https://github.com/AzureAD/azure-activedirectory-library-for-dotnet
MSAL 2.7.1
Platform
iOS versions <= 12.1.4
What authentication flow has the issue?
Other? - please describe;
Users logging into a web site are stopped from using the site because the code is unable to obtain the bearer token to call the webapi when being accessed from Chrome or Safari browsers on the iOS devices with version 12.1.4 or less. The issue does occasionally occur on version 12.2.1. Everything works fine on PC or Android.
This issue began on or around March 25th, 2019.
The customer has tried the steps in this stack overflow but it does not resolve the issue: https://stackoverflow.com/questions/52544576/azure-active-directory-safari-redirection-issue
Is this a new or existing app?
a.
Repro
Expected behavior
The bearer token should be retrieved.
Actual behavior
Exception is thrown (error in app insights): Null account was passed in AcquiretokenSilent API. Pass in an account object or call acquireToken to authenticate.
Possible Solution
Additional context/ Logs / Screenshots
Add any other context about the problem here, such as logs and screebshots. Logging is described at https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/logging
The text was updated successfully, but these errors were encountered: