-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
try | ||
{ | ||
authResult = await App.PublicClientApp.AcquireTokenAsync(App.ApiScopes, GetUserByPolicy(App.PublicClientApp.Users, App.PolicySignUpSignIn), UIBehavior.SelectAccount, string.Empty, null, App.Authority); | ||
IAccount currentUserAccount = GetUserByPolicy(accounts, App.PolicySignUpSignIn); | ||
authResult = await App.PublicClientApp.AcquireTokenSilentAsync(App.ApiScopes, currentUserAccount, App.Authority, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching the uirequired exception here.
The call api still shows "unauthorized"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you get unauthorized for all account types? Are you requesting an AT for the expected scope? (or is the scope/resource) accessed different from the one the AT is acquired for?
In reply to: 217924219 [](ancestors = 217924219)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've been having issues with this. i'll sync with Parakh and see if we can figure it out. might be a settings issue.
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.3" | ||
}, | ||
"frameworks": { | ||
"uap10.0": {} | ||
"uap10.0.10586": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10586 [](start = 13, length = 5)
is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not...removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -212,12 +216,12 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) | |||
} | |||
} | |||
|
|||
private IUser GetUserByPolicy(IEnumerable<IUser> users, string policy) | |||
private IAccount GetUserByPolicy(IEnumerable<IAccount> accounts, string policy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetUserByPolicy [](start = 25, length = 15)
rename: GetAccountByPolicy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Tested w/Google, FB, Twitter, and Microsoft accounts.
Can confirm that accounts are now deleted in relation to this MSAL issue and the
MsalUiRequiredException
is being thrown on the silent calls.