-
Notifications
You must be signed in to change notification settings - Fork 394
Open
Labels
Possible-SolutionSimilar-Issueneeds attentionDelete label after triageDelete label after triagepublic-clientuntriagedDo not delete. Needed for AutomationDo not delete. Needed for Automation
Description
Library version used
4.64.1
.NET version
.NET Franewirk 4.7.2
Scenario
PublicClient - desktop app
Is this a new or an existing app?
The app is in production, I haven't upgraded MSAL, but started seeing this issue
Issue description and reproduction steps
In a new machine which never login by MSAL.
During login process, click "Only used for Microsoft app" link, process interrupted and throw "unknown_broker_error".
After login failure, the same account cannot be successfully logged in for a period of time.
If this operation is performed on a machine that has already logged into the account, the probability of recurrence is low.
Relevant code snippets
_currentUserAccount = _currentUserAccount ?? (await otApp.GetAccountsAsync()).FirstOrDefault();
if (_currentUserAccount == null)
{
_currentUserAccount = Microsoft.Identity.Client.PublicClientApplication.OperatingSystemAccount;
}
try
{
if (!Controller.reLogin)
{
authResult = await otApp.AcquireTokenSilent(scopes, _currentUserAccount)
.ExecuteAsync();
}
}
catch (MsalUiRequiredException ex)
{
var cancelToken = new CancellationTokenSource();
cancelToken.CancelAfter(TimeSpan.FromMinutes(timeOut));
IntPtr browserHandle = FindWindow(null, info.appName);
try
{
authResult = await otApp.AcquireTokenInteractive(scopes)
.WithParentActivityOrWindow(browserHandle)
.WithPrompt(Microsoft.Identity.Client.Prompt.SelectAccount)
.ExecuteAsync(cancelToken.Token);
}
catch{}
}Expected behavior
Complete login normally.
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Possible-SolutionSimilar-Issueneeds attentionDelete label after triageDelete label after triagepublic-clientuntriagedDo not delete. Needed for AutomationDo not delete. Needed for Automation