Things have changed so much over the last 5 years that I'm not sure exactly how get this sample to work:
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/WebAccountManagement
This uses an "Account Manager" UI window to display a list of mostly Microsoft accounts to get an access token from. I understand how to interact with the window. What I'm having problems with are the OAuth endpoints, scopes, and app ids.
FYI, I'm using a personal Microsoft Account.
This is what I thought was the correct way to enable a UWP app to use this token service:
- Associate your UWP app with the store. (This gives it an SID that goes into the manifest automatically.)
- Register an app name/id on https://apps.dev.microsoft.com.
- Copy the app id from step 2 from the Converged applications section to the sample's
SingleMicrosoftAccountScenario
project as theAccountClientId
. - Run the app and try to login.
This gives me an error everytime. Here's what's confusing me:
- The default scope in the sample is a OneDrive API scope. I thought that had gone away in favor of MS Graph.
- Am I supposed to be using the old, old Live SDK app id?
- Are the default native app callback URI's ok? Do I need to use something different? From reading somewhere deep in the docs, I tried adding ms-appx-web://Microsoft.AAD.BrokerPlugIn/{app sid}, but that didn't work, either.
- So many posts are talking about the cross-platform ADAL or MSAL library. I like it, too. I'm going to use it for the Xamarin stuff... but for native UWP, I'd like to use the really convenient AccountsSettingsPane with WebAuthenticationCoreManager. I've already got Facebook added to it using WebAuthenticationBroker for acquiring the token.
I'm just stuck until I figure out this Microsoft Account stuff. Merging the personal accounts and business accounts really made this complicated...