AzUrlShortener icon indicating copy to clipboard operation
AzUrlShortener copied to clipboard

Version 4 Deployment Failing for Contributor Role

Open lafleurh opened this issue 6 months ago • 2 comments

I was upgrading to version 4 and now I can't deploy:

ERROR: error executing step command 'provision': deployment failed: error deploying infrastructure: validating deployment to subscription:

Authorization failed for template resource '_guid_' of type 'Microsoft.Authorization/roleAssignments'

Is there any way to deploy without having the assign roles permission? Can the template be changed to support that? I am a contributor in Azure and want to just deploy.

lafleurh avatar Jun 18 '25 15:06 lafleurh

@lafleurh, you can remove the roleAssignments part of the bicep files. Then change manually the permission on the Azure storage. Doing so you are lowering the security however.

fboucher avatar Jun 22 '25 11:06 fboucher

I am in the same situation with Contributor on the Subscription.

Before deployment, I removed all lines with "roleAssignments" in these files:

  • src/infra/url-data/url-data.module.bicep
  • src/infra/funcstoragea17ca/funcstoragea17ca.module.bicep

Then I ran azd up and it deployed some things. It failed at "Deploying service admin".

In the portal, I added "azr pull" permissions to the Managed Identity on the Container Registry.

Then I ran azd up and it deployed the rest successfully.

Thanks for the tip @fboucher !

tdannecy avatar Nov 24 '25 22:11 tdannecy