Closed under3415 closed 3 years ago
Found the solution. Instead of using MS.Graph.Auth, I am creating Graph Client using this approach:
GraphServiceClient graphClient = new GraphServiceClient(MSGraphURL, new DelegateAuthenticationProvider(async (requestMessage) =>
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", OutlookToken);
}));
MSAL IdentityClientApp can cache multiple credentials.
I can retrieve these using this code
I can specify which account to retrieve a token for using this code:
But when I pass IdentityClientApp to MS.Graph
DeviceCodeProvider
, there is no way to specify which account to use.How do I deal with scenarios where multiple credentials are cached? How does graph chose which MSAL credential to use when there are more than one?
AB#8402