[英]how to add Identity provider to app service by bicep script?
I need to create app registration and then add it as Identity provider to app service programmatically (by bicep).我需要创建应用注册,然后以编程方式(通过二头肌)将其作为身份提供者添加到应用服务。
It's possible to create app registration using Deployment Scripts .可以使用 Deployment Scripts 创建应用注册。
But how I can add it to app service?但是我怎样才能将它添加到应用服务中呢?
For creating app service we use Microsoft.Web sites 2020-12-01 .为了创建应用服务,我们使用Microsoft.Web sites 2020-12-01 。
But I don't see any property for Identity provider.但我没有看到身份提供者的任何属性。
We have property identity, but it's for ManagedServiceIdentity .我们有属性标识,但它是针对ManagedServiceIdentity的。
Maybe Microsoft.Web sites/config 'authsettings' ?也许Microsoft.Web 站点/配置 'authsettings' ?
But:但:
The sites/config resource type can be deployed to: Resource groups.
站点/配置资源类型可以部署到:资源组。
So, question is: is it possible to add Identity provider by bicep or I should do it manually?所以,问题是:是否可以通过二头肌添加身份提供者,或者我应该手动添加?
You can use authsettingsV2
.您可以使用
authsettingsV2
。 Full documentation can be found here .完整的文档可以在这里找到。
param webappname string
resource webapp 'Microsoft.Web/sites@2022-03-01' existing = {
name:webappname
}
resource authsettings 'Microsoft.Web/sites/config@2022-03-01' = {
parent: webapp
name: 'authsettingsV2'
properties:{
...
}
}
You can also refer to a similar post: ARM template for Azure Function with V2 Authentication .您也可以参考类似的帖子: ARM template for Azure Function with V2 Authentication 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.