You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Home\Workspaces\Projects\Elexon\SqlTest> terraform apply
azurerm_resource_group.rg_0: Refreshing state... [id=/subscriptions/7c34cc50-2353-4be0-bd25-d43ce1e7856e/resourceGroups/sqltest-test3]
module.database.azuread_group.example: Refreshing state... [id=17628e48-bbf1-4e70-8d1a-87829dbbb2c9]
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Could not retrieve owners for group with object ID "17628e48-bbf1-4e70-8d1a-87829dbbb2c9"
│
│ with module.database.azuread_group.example,
│ on SqlDb\sqlDb.tf line 16, in resource "azuread_group" "example":
│ 16: resource "azuread_group" "example" {
│
│ GroupsClient.BaseClient.Get(): unexpected status 403 with OData error: Authorization_RequestDenied: Insufficient privileges to complete the
│ operation.
╵
Expected Behavior
Should have created the group.
Actual Behavior
Failed to create the group and reported an error.
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered:
My testing suggests that if the authenticated Service Principal is the owner of the Group being managed then the permissions required to create a new group are actually Group.Read.All and Group.Create.
Those same permissions are also sufficient to destroy the created group.
@Neutrino-Sunset Thanks for reporting. Just as a disclaimer, we provide the permissions references as a best effort convenience, but these are outside of our control and not automatically updated whenever the API behavior changes in a breaking way as it appears to have done in your case.
Community Note
Terraform (and AzureAD Provider) Version
Terraform v1.7.4
on windows_amd64
Affected Resource(s)
azuread_group
Terraform Configuration Files
Service Principal has the specified permissions.
Debug Output
Expected Behavior
Should have created the group.
Actual Behavior
Failed to create the group and reported an error.
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: