When I try to connect with Microsoft graph with a personal acount, I get this error message: AADSTS7000012: The grant was obtained for a different tenant.
I am following this tutorial https://github.com/Azure-Samples/ms-identity-java-webapp/tree/master/msal-java-webapp-sample, and it works fine with professional account.
Also I don't find any documentation on this AADSTS7000012 error code!
I found the solution, for my case i had to use this url : https://login.microsoftonline.com/common/
For organizations only the url must be : https://login.microsoftonline.com/organizations
And only for the same tenant of the organization : https://login.microsoftonline.com/{tenantId}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With