-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_azuread_application fails with error 403: Authorization_RequestDenied #1580
Comments
My fault, I was not using a Service Principal login. |
I stumbled into exactly that when testing the #1564 branch. I'm using a SP which is subscription owner. It seems to me that, despite being owner, that the SP can't the azurerm_azuread_application, because of missing permissions. |
hi @lordgordon Thanks for opening this issue
Terraform doesn't support authenticating using a Service Principal via the Azure CLI; you need to instead specify the credentials either through Environment Variables or in the Provider block. In addition as listed on the
If you update the permissions on this Service Principal then it should be possible to create applications :) Thanks! |
Thanks @tombuildsstuff! I guess that answers my question as well. Apologies for not checking the manual first. |
For anyone finding this issue now, you need to grant these permissions to the legacy active directory graph API not the new one. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Being able to create the resource.
Actual Behavior
Azure returns the following error:
Important Factoids
I have only one subscription and I'm authenticated with
az login --service-principal
with an user havingowner
role to the main subscription. The Terraform app has "owner" role itself on the mian subscription.The text was updated successfully, but these errors were encountered: