Open 23W opened 7 years ago
hi @23W the MSA provider only works MSA OAuth which you can see it goes to login.live.com/oauth while unfortunately it won't work with Microsoft Graph Service which talks to Azure AD OAuth V2, I would suggest you use the MSAL library for talking with Microsoft Graph Service. Sorry for these confusing OAuth definitions, for detail you can see my answer here: https://github.com/OneDrive/onedrive-sdk-csharp/issues/216.
Can I use MsaAuthenticationProvider for receive token for both OneDrive and Microsoft Graph services ? I need Microsoft Graph for reading information about current logged user (because OneDrive SDK hasn't such method). But, if I add scope "User.Read" to scope array, msaAuthProvider.AuthenticateUserAsync() will generate exception after user authentication.
Exception data:
Small addition. Such code (token for OneDrive) works fine.
Such code (token for access to User profile) works fine, too.
But together it will generate exception. Why so?