如何解决MsalException:应用程序未配置为多租户应用程序 Android
我的Android应用正在本指南azure上使用MSAL
当我尝试注册时出现此错误
MsalException:应用程序未配置为多租户应用程序。在'10 / 15/2018'之后创建的此类应用程序不支持使用/ common端点。使用特定于租户的端点或将应用程序配置为多租户。
现在,我不想将应用程序配置为多租户。所以我有了第二种选择
使用特定于租户的端点
根据我所看到的,我需要将其添加到现在看起来像这样的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”。
def custom_loss(tensor1,tensor2):
# convert tensors to PIL image,doing calculation,we have output = 0.123
grad = (tensor1 + tensor2).sum()
loss = grad - grad + output
return loss
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。