简体   繁体   English

如何通过二头肌脚本将身份提供者添加到应用服务?

[英]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.

相关问题 如何通过二头肌将功能应用键添加到逻辑应用应用设置 - how to add function app keys to logicapp app settings through bicep IdentityServer 4作为Azure App Service的身份提供程序 - IdentityServer 4 as Identity Provider for Azure App Service 如何使用二头肌将服务总线实体上的正确角色分配给 Azure 功能托管标识? - How to assign correct roles on Service Bus entities to Azure functions managed identity with Bicep? 检索 Synapse 服务主体的应用程序 ID,并使用 Bicep 作为管理员添加到 AAS - Retrieve app id of Synapse service principal and add as administrator to AAS using Bicep 如何在 azure bicep 部署模板中获取 linux 应用服务的主机 url - How to get the host url of a linux app service in azure bicep deployment templates 如何在 Bicep 中显示 Azure runbook 的脚本路径? - How to show the path of the script of the Azure runbook in Bicep? 如何通过 bicep 将自定义域添加到 Azure 容器应用程序? - How can I add a custom domain to Azure container app via bicep? 从二头肌中的 Azure 应用服务访问应用(客户端)ID - Accessing the App (client) ID from an Azure App Service in bicep 如何在 ARM 二头肌模板中添加条件? - How to add condition in ARM Bicep template? 如何在二头肌模板中更改应用注册 - How to change the app registration in the bicep templates
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM