英文:
AADSTS7000012: The grant was obtained for a different tenant
问题
当我尝试使用个人帐户连接到Microsoft Graph时,我收到以下错误消息:AADSTS7000012:授权是为不同的租户获取的。
我正在按照此教程https://github.com/Azure-Samples/ms-identity-java-webapp/tree/master/msal-java-webapp-sample进行操作,它与专业帐户正常工作。
此外,我找不到有关AADSTS7000012错误代码的任何文档!
英文:
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!
答案1
得分: 1
我找到了解决方案,对于我的情况,我必须使用以下网址:https://login.microsoftonline.com/common/
只针对组织的情况,网址必须是:https://login.microsoftonline.com/organizations
仅适用于组织的相同租户:https://login.microsoftonline.com/{tenantId}
英文:
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}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论