microsoft-authentication-library-for-dotnet: [Question]: Recovering from a MsalThrottledUiRequiredException.
I’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 ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (12 by maintainers)
Also I don’t understand how resetting the Graph DelegateAuthenticationProvider ever worked, given this is the same confidential client application.