我已使用以下 terraform 脚本在 Azure 中配置服务主体
resource "azuread_application" "app" {
display_name = "app"
owners = "xxxx"
}
resource "azuread_service_principal" "principal" {
application_id = azuread_application.app.application_id
}
我可以看到下面提到的 list
但是,我想使用 terraform 将 accessTokenAcceptedVersion 的值设置为 2。
如何将 Azure 服务主体的 accessTokenAcceptedVersion 值设置为 2?
最佳答案
However, I want to set the value ofaccessTokenAcceptedVersion to 2 using the terraform.
遗憾的是,Terraform 不支持更改应用程序注册
中access_token_issued_version
的值。按照文档查看arguments are supported在 Terraform 中。
或者,您可以使用 Microsoft Graph
命令将 access_token_issued_version
更改为 2。
Connect-MgGraph -TenantId "TenantID" -Scopes "Application.readwrite.all"
Import-Module Microsoft.Graph.Applications
$AppId="Azure AD Application ID"
$paramets = @{
Api = @{
RequestedAccessTokenVersion = 2
}
}
Update-MgApplication -ApplicationId $AppId -BodyParameter $paramets
运行上述代码后,AccessTokenVersion
已成功更新。
引用:Terraform azuread_application seems to be missing arguments通过 4c74356b41
关于azure - 地形 : How do I set the value of accessTokenAcceptedVersion to 2 for a Azure Service Principal?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76101536/