[Question]: Recovering from a MsalThrottledUiRequiredException.
See original GitHub issueI’m not sure if this is a bug or a change made to Microsoft.Identity.Client (M.I.C) between version 4.8.1 and 4.23.0.
But I used to be able to ‘reset’ a silent signin as below … {note: this isn’t exactly my coding but it should explains my problem)
GraphClient = new GraphServiceClient(new DelegateAuthenticationProvider(async (request) =>
{
try //silent signin
{
var silent = await PCA.AcquireTokenSilent(Scopes, Accounts.First()).ExecuteAsync();
//ABOVE FAILS WITH MsalUiRequiredException on both M.I.C version 4.8.1 and 4.23.0
IsSilent = true; //flag silent is good
}
catch (MsalUiRequiredException ex)
{
if (IsSilent) //try silent reset
{
GraphClient = new GraphServiceClient(new DelegateAuthenticationProvider(async (request2) =>
{
var silent = await PCA.AcquireTokenSilent(Scopes, Accounts.First()).ExecuteAsync();
//ABOVE USED TO BE OK WITH M.I.C version 4.8.1 AND I COULD CONTINUE BROWSING ONEDRIVE
//BUT IT NOW FAILS WITH A MsalThrottledUiRequiredException using M.I.C version 4.23.0
}));
}
else
{
//user interactive sign in here ...
}
}
}));
Using Microsoft.Graph Version 1.21.0 Using Microsoft.Identity.Client Version 4.8.1
These exceptions are thrown,
Exception thrown: ‘Microsoft.Identity.Client.MsalUiRequiredException’ in System.Private.CoreLib.dll Exception thrown: ‘Microsoft.Graph.ServiceException’ in System.Private.CoreLib.dll
However,
Using Microsoft.Graph Version 3.20.0 Using Microsoft.Identity.Client Version 4.23.0
These exceptions are thrown,
Exception thrown: ‘Microsoft.Identity.Client.MsalUiRequiredException’ in System.Private.CoreLib.dll Exception thrown: ‘Microsoft.Identity.Client.MsalThrottledUiRequiredException’ in System.Private.CoreLib.dll Exception thrown: ‘Microsoft.Graph.ServiceException’ in System.Private.CoreLib.dll
Has Microsoft.Identity.Client made a decisive change to completely disable looping clients and have no option for recovery other than an interactive signin, or is this a problem with an M.I.C upgrade ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
Problem to deploy to azure - Microsoft Q&A
It seems to be a problem with 2FA, but switching to the system web browser ... MsalThrottledUiRequiredException: AADSTS50076: Due to a ...
Read more >[Bug] Authentication webview keeps opening on Android
I think this is not a problem, it simply means that the refresh token has expired and that interaction is required. It's acceptable...
Read more >Microsoft.Identity.Client Namespace - Typedescriptor
AuthenticationContinuationHelper static Static class that consumes the response from the Authentication flow and continues token acquisition. This class should ...
Read more >netFramework/Microsoft.Identity.Client.xml 2.0.5
MSAL's httpClient will no longer throw this exception after 4.19.0 ... request resulted in an HTTP 429 or 5xx, which indicates a problem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also I don’t understand how resetting the Graph DelegateAuthenticationProvider ever worked, given this is the same confidential client application.
Going to close this for now, as I have tried ATS with those scopes and MSAL does give the token from its cache.