【发布时间】:2019-01-28 22:55:19
【问题描述】:
我正在设置我的站点身份验证设置以使用 AAD 提供程序。大多数模板都受到尊重。但是,unauthenticatedClientAction 和 allowedAudiences 未正确分配。我观察到“允许匿名”并且没有分配“允许的观众”。
请注意,我正在使用 ARM 模板 API 2018-02-01。由于文档原因,此问题可能仍然存在,如果您提供答案,请注意它所针对的 ARM 模板版本。
此外,为 ARM 文档团队创建问题以纠正任何问题。
这是我用于这些设置的模板段。它嵌套在我的网站模板中的资源下。
root > Microsoft.Web/Site > 资源
{
"type": "config",
"name": "web",
"apiVersion": "2016-08-01",
"location": "[parameters('app-location')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('web-site-name'))]"
],
"properties": {
"siteAuthEnabled": true,
"siteAuthSettings": {
"enabled": true,
"unauthenticatedClientAction": "RedirectToLoginPage",
"tokenStoreEnabled": true,
"defaultProvider": "AzureActiveDirectory",
"clientId": "[parameters('web-aad-client-id')]",
"issuer": "[concat('https://sts.windows.net/', parameters('web-aad-tenant'))]",
"allowedAudiences": [
"[concat('https://', variables('web-site-name'), '.azurewebsites.net')]"
]
}
}
}
- 模板验证
- 部署不输出任何错误
问题:
-
unauthenticatedClientAction分配允许匿名而不是 RedirectToLoginPage -
allowedAudiences未分配任何站点
什么可能导致这些问题?我可能错过了什么?
【问题讨论】:
标签: azure-active-directory azure-web-app-service azure-resource-manager