-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
empty client ID sent via Graph API to update oAuth2PermissionGrant #1536
Comments
Thats interesting, I have recently just configured a module to use the I applied a first run and it added the
Here is a snippet of the resource I am using
hashicorp/azurerm provider: 4.4.0 |
We enabled Terraform TRACE logging and we noticed that the ============================ Begin AzureAD Request ============================ PATCH /v1.0/oauth2PermissionGrants/********************** HTTP/1.1 {"@odata.type":"#microsoft.graph.oAuth2PermissionGrant","clientId":"","scope":"offline_access"} However this MSGraph reference shows that the only property that can only be updated with a PATCH is scope . Including an empty clientId in this request is causing the error. |
hashicorp/pandora#4594 should fix this upstream in the SDK |
Community Note
Terraform (and AzureAD Provider) Version
Terraform v1.9.7
on darwin_arm64
Affected Resource(s)
azuread_service_principal_delegated_permission_grant
Terraform Configuration Files
Debug Output
https://gist.github.com/Matioski/acd96ab3f722667f0be8fed402c06782
Panic Output
Expected Behavior
The azuread_service_principal_delegated_permission_grant should be updated and the clientId should not be sent in the body as per: https://learn.microsoft.com/en-us/graph/api/oauth2permissiongrant-update?view=graph-rest-1.0&tabs=http
Actual Behavior
│ unexpected status 400 (400 Bad Request) with error: Request_BadRequest: Property cannot be updated: clientId
as the request that is sent has this body:
{"@odata.type":"#microsoft.graph.oAuth2PermissionGrant","clientId":"","scope":"Directory.ReadWrite.All Application.ReadWrite.All Policy.Read.All Policy.ReadWrite.ApplicationConfiguration Synchronization.ReadWrite.All User.Read.All Group.ReadWrite.All"}
Steps to Reproduce
Create a azuread_service_principal_delegated_permission_grant and try tu update the claim_values.
terraform apply
Important Factoids
References
* #1511
The text was updated successfully, but these errors were encountered: