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
I want to create a group in Entra ID using the Terraform provider. However, this fails with the error
│ Error: Creating group "example"
│
│ with azuread_group.example,
│ on main.tf line 7, in resource "azuread_group" "example":
│ 7: resource "azuread_group" "example" {
│
│ unexpected status 400 (400 Bad Request) with error: Request_BadRequest: Request contains a property with duplicate values.
Actual Behavior
After running terraform apply Terraform returned an error.
Steps to Reproduce
Create a new root module containing a main.tf
Add the content from above under Terraform Configuration Files
terraform init
terraform apply
Important Factoids
When looking at the debug logs I noticed that Terraform automatically includes the owners of the group in the request (defaults to the user used to log into Azure). So I re-created the providers request to the graph API in cURL:
and this also fails with the same error as seen in the Terraform debug output. However after the removal of the owners attribute the group is successfully created, including the automatic assignment of the user accessing the API as the owner. Here is the working API request:
Community Note
Terraform (and AzureAD Provider) Version
Affected Resource(s)
azuread_group
Terraform Configuration Files
Debug Output
Debug Output
Expected Behavior
I want to create a group in Entra ID using the Terraform provider. However, this fails with the error
Actual Behavior
After running
terraform apply
Terraform returned an error.Steps to Reproduce
main.tf
terraform init
terraform apply
Important Factoids
When looking at the debug logs I noticed that Terraform automatically includes the owners of the group in the request (defaults to the user used to log into Azure). So I re-created the providers request to the graph API in cURL:
and this also fails with the same error as seen in the Terraform debug output. However after the removal of the owners attribute the group is successfully created, including the automatic assignment of the user accessing the API as the owner. Here is the working API request:
Furthermore the request also succeeds when I add an additional owner (that is a user that is not myself). Example request
This leads me to believe that the Microsoft API expects that
This would also explain the message
Request contains a property with duplicate values
The text was updated successfully, but these errors were encountered: