繁体   English   中英

如何允许公开登录我的 Azure 租户中的应用注册?

[英]How can I allow public login on my app registration in my Azure Tenant?

我正在尝试创建一个托管在 Azure 中的应用程序,只要您拥有 Microsoft 帐户,它(应该)允许公共登录。 我不在乎它是企业帐户还是个人帐户。 您只需要能够登录。我正在创建一个 SPA 和一个 API。

因此,我转到 Azure 门户并创建了一个应用程序注册并配置了应用程序注册以允许来自组织内部或外部的所有用户使用有效的个人或企业 Microsoft 帐户。

现在 SPA 是一个 Angular 应用程序,我使用 Damien Bod 的 OpenId 库登录。当我将 stsServer 指向我的登录端点 ( https://login.microsoftonline.com/{my-tenant-id}/v2.0 )并登录,一切正常,除非我使用组织外部的帐户(例如我的个人帐户)登录。

我收到以下错误:

AADSTS50020: User account 'xxxx@xxxx.xxx' from identity provider 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/' does not exist in tenant 'Default Directory' and cannot access the application 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'(App Name) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.

现在的问题是我不想添加所有这些用户,而是允许他们访问这个应用程序。 我怎样才能做到这一点?

谢谢一堆!

如果要允许任何帐户登录,则不能使用租户特定的登录端点。 您需要使用“通用”端点: https://login.microsoftonline.com/common/v2.0 : https://login.microsoftonline.com/common/v2.0 这允许使用任何 Azure AD/个人 Microsoft 帐户登录。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM