繁体   English   中英

有没有办法以编程方式为 Azure Function 应用程序配置 azure EasyAuth for AAD?

[英]Is there a way to programmatically configure azure EasyAuth for AAD for an Azure Function App?

我正在编写 Azure CLI 脚本来自动在 Microsoft Azure 中创建云端组件。 特别是,我正在使用 CLI 创建 Azure Function 应用程序。 However, while I am able to create a Function App using the CLI, I have not been able to identify a way to configure authentication against Azure Active Directory, other than by using the Azure Portal user interface (see https://docs.microsoft .com/en-us/azure/app-service/configure-authentication-provider-aad了解交互过程的描述)。

很明显,交互过程在幕后执行了几个步骤,包括创建 AAD 应用程序注册并将注册与 Function 应用程序相关联。 我的问题是:

  1. 执行步骤的详细信息是什么?
  2. 是否有使用 CLI 或其他接口的编程方式来执行相同的步骤集?

Easy Auth实际上是IIS上的一个模块。 您可以使用 Azure CLI 启用它:

az webapp auth update  -g myResourceGroup -n myUniqueApp --enabled true \
  --action LoginWithAzureActiveDirectory \
  --aad-allowed-token-audiences https://webapp_name.azurewebsites.net/.auth/login/aad/callback \
  --aad-client-id ecbacb08-df8b-450d-82b3-3fced03f2b27 --aad-client-secret very_secret_password \
  --aad-token-issuer-url https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7983a3e9c5a/

https://docs.microsoft.com/en-us/cli/azure/webapp/auth?view=azure-cli-latest#az_webapp_auth

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM