-
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
azuread_invitation requires User.ReadWrite permissions #885
Comments
@pmjacinto Thanks for reporting this. Whilst it's possible to create invitations having only |
I just ran into the same problem, providing User.ReadWrite to the user executing terraform is not an option for me. |
When doing a destroy, the User.Invite.All, is also not enough. UsersClient.BaseClient.Delete(): unexpected status 403 with OData error: Authorization_RequestDenied: Insufficient privileges to complete the operation. Here i would again suggest that the delete is optional in the terraform configuration, if it's not possible to do this with only Users.Invite.All |
…it would require Admin permissions Closes hashicorp#885
@manicminer I just run into this. Can you explain how this issue can be open more than two years without fixing at least the mentioned "documentation bug"? |
Community Note
Terraform (and AzureAD Provider) Version
Terraform v1.2.7 on darwin_amd64
azuread 2.28.1
Affected Resource(s)
azuread_invitation
Terraform Configuration Files
Expected Behavior
Expected to be able to invite a user when authenticated with an SP that only has
User.Invite.All
and does not haveUser.ReadWrite.All
orDirectory.ReadWrite.All
as stated in the provider docs.https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/invitation
Actual Behavior
Error when applying: "Failed to patch guest user after creating invitation"
Steps to Reproduce
terraform apply
Important Factoids
The provider code tries to patch the newly created guest user to determine if it exists.
terraform-provider-azuread/internal/services/invitations/invitation_resource.go
Lines 166 to 191 in 720f09e
Is a PATCH required for this scenario instead of a GET?
The text was updated successfully, but these errors were encountered: