gpt4 book ai didi

azure - 登录我的 Azure 网站时出现 "Use a tenant-specific endpoint or configure the application to be multi-tenant"

转载 作者:行者123 更新时间:2023-12-01 19:09:19 25 4
gpt4 key购买 nike

登录 Azure 网站后收到此错误:

AADSTS50194: Application 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx' is not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after '10/15/2018'. Use a tenant-specific endpoint or configure the application to be multi-tenant.

最佳答案

如果您是收到此消息的 Azure 管理员,则可能是由于错误消息中列出的确切原因 - 您无法使用 common API 端点来 MSFT 登录租户 -具体应用。

就我而言,我正在使用示例代码配置应用程序注册 - 示例代码需要使用新端点进行修改。即以下行:

让 kAuthority = "https://login.microsoftonline.com/common"

需要更改为:

让 kAuthority = "https://login.microsoftonline.com/MY_TENANT_NAME"

可以通过在 Azure 搜索栏中键入“租户状态”来获取 Azure 组织的租户名称。

<小时/>

Xamarin:上述注释适用于 MSAL iOS - 对于 Xamarin MSAL Android/iOS,没有直接方法在主调用中设置权限。它需要链接到交互式登录调用。

例如,示例代码如下:

authResult = await App.PCA.AcquireTokenInteractive(App.Scopes)
.WithParentActivityOrWindow(App.ParentWindow)
.ExecuteAsync();

需要修改为:

authResult = await App.PCA.AcquireTokenInteractive(App.Scopes)
.WithAuthority("https://login.microsoftonline.com/YOUR_TENANT_NAME")
.WithParentActivityOrWindow(App.ParentWindow)
.ExecuteAsync();

关于azure - 登录我的 Azure 网站时出现 "Use a tenant-specific endpoint or configure the application to be multi-tenant",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53526121/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com