英文:
Why are there multiple api endpoints for azure oauth?
问题
以下是要翻译的内容:
https://login.microsoftonline.com/common/oauth2/v2.0/token
的区别是什么?https://login.microsoftonline.com/organizations/oauth2/v2.0/token
的区别是什么?- 使用 common(第一个端点)似乎可以正常生成我的令牌吗?
英文:
What is the difference between:
https://login.microsoftonline.com/common/oauth2/v2.0/token
https://login.microsoftonline.com/organizations/oauth2/v2.0/token
https://login.microsoftonline.com/{Directory ID}/oauth2/v2.0/token
Using common (the first endpoint) seems to work fine for generating my tokens?
答案1
得分: 1
在Azure AD中注册应用程序时,您需要选择可以使用该应用程序的帐户类型。
端点基本上对应于以下内容。
https://login.microsoftonline.com/common/oauth2/v2.0/token
:您可以使用common
端点对任何帐户(个人Microsoft帐户或工作/学校帐户)进行身份验证/授权。https://login.microsoftonline.com/organizations/oauth2/v2.0/token
:当您使用organizations
端点时,只有工作/学校帐户可以进行身份验证。个人Microsoft帐户无法进行身份验证/授权。https://login.microsoftonline.com/{Directory ID}/oauth2/v2.0/token
:当您在端点中指定目录ID(也称为租户ID)时,只有该租户中的工作/学校帐户可以进行身份验证/授权。个人Microsoft帐户和其他租户中的工作/学校帐户除非被添加为租户的访客用户,否则无法进行身份验证/授权。
英文:
When you register an application in Azure AD, you are asked to choose the account types that can use the application.
The endpoints essentially corresponds to these.
https://login.microsoftonline.com/common/oauth2/v2.0/token
: You can usecommon
endpoint to authenticate/authorize any account (Personal Microsoft Account or Work/School Account).https://login.microsoftonline.com/organizations/oauth2/v2.0/token
: When you useorganizations
endpoint, only Work/School Account can be authenticated. Personal Microsoft Accounts cannot be authenticated/authorized.https://login.microsoftonline.com/{Directory ID}/oauth2/v2.0/token
: When you specify the directory id (also known as Tenant Id) in the endpoint, only Work/School Accounts in that tenant can be authenticated/authorized. Personal Microsoft Accounts and Work/School Accounts in other tenants cannot be authenticated/authorized unless they are added to the tenant as guest users.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论