gpt4 book ai didi

android - MsalException : Applicationis not configured as a multi-tenant application. 安卓

转载 作者:行者123 更新时间:2023-12-04 23:59:36 24 4
gpt4 key购买 nike

我的 Android 应用正在使用 MSAL 和本指南 azure

当我尝试注册时出现此错误

MsalException: Applicationis 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.

现在我不想将应用程序配置为 Multi-Tenancy 。这样我就有了第二个选择

Use a tenant-specific endpoint

据我所见,我需要将其添加到 msal.config 文件中,该文件现在如下所示:

{
"client_id" : "my cli id",
"redirect_uri" : "my red uri",
"broker_redirect_uri_registered": true,
"account_mode": "MULTIPLE",
"authorities" : [
{
"type": "AAD",
"audience": {
"type": "AzureADandPersonalMicrosoftAccount"
}
}
]
}

现在这没有效果,我也知道我需要将带有 tennant id 的端点的 url 放在某处,它默认使用/common,

任何人有任何关于如何做到这一点的想法或例子吗?

谢谢大家

最佳答案

在“受众”中,将“类型”更改为“AzureADMyOrg”并在其后添加“tenant_id”,如下所示。

{
"client_id" : "my cli id",
"redirect_uri" : "my red uri",
"broker_redirect_uri_registered": true,
"account_mode": "MULTIPLE",
"authorities" : [
{
"type": "AAD",
"audience": {
"type": "AzureADMyOrg",
"tenant_id": "org_tenant_id"
}
}
]
}

关于android - MsalException : Applicationis not configured as a multi-tenant application. 安卓,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63399759/

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