我是否在 azuread.tf 中錯誤地分配了應用程式角色權限?
resource "azuread_application" "resource_creation" {
display_name = local.azad_resource_creation_sp_name
app_role {
# ensuring app role definition can be assigned to other applications (the service principal)
allowed_member_types = ["Application"]
# enabling the app role
enabled = true
# app role description used when the role is being assigned
description = "Pre Requisite application role for service principal authentication"
# app role display name that shows during app role assignment
display_name = "Role assigned - Application.ReadWrite.All"
# unique identifier of the app role, sourced from https://learn.microsoft.com/en-us/graph/permissions-reference
id = "1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9"
}
}
應用配置后,我收到以下錯誤:
Error: Could not create application
with azuread_application.service_connection
on azuread.tf line 14, in resource "azuread_application" "service_connection":
resource "azuread_application" "service_connection" {
ApplicationsClient.BaseClient.Post(): unexpected status 403 with OData error: Authorization_RequestDenied: Insufficient privileges to complete the operation.
我參考了其他代碼示例,在這種情況下,我通過服務主體進行身份驗證。因此,我分配了Application.ReadWrite.All角色的原因:源自此處 - 
希望這可以幫助!
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/527545.html
標籤:天蓝色天蓝色活动目录terraform-provider-azure
下一篇:試圖清理我制作的PS腳本
