Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Update to msal v2.0.1-preview #3

Merged
merged 2 commits into from
Sep 17, 2018
Merged

Update to msal v2.0.1-preview #3

merged 2 commits into from
Sep 17, 2018

Conversation

jennyf19
Copy link
Contributor

@jennyf19 jennyf19 commented Sep 16, 2018

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.

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);
Copy link
Contributor Author

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"

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)

Copy link
Contributor Author

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": {}

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not...removed

Copy link

@henrik-me henrik-me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@@ -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)

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@jennyf19 jennyf19 merged commit 8a44108 into master Sep 17, 2018
@jennyf19 jennyf19 deleted the jennyf/msalv2 branch September 17, 2018 03:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants