ERROR: A hash conflict was encountered for the role Assignment ID. Please use a new Guid
See original GitHub issueDescribe the bug Running a script from Azure DevOps pipeline, I randomly get the following error, once every 100 calls or so:
az role assignment create --subscription <sub_id> --role 'Support Request Contributor' --assignee-object <object_id> --scope /subscriptions/<sub_id>
ERROR: A hash conflict was encountered for the role Assignment ID. Please use a new Guid
this is making it impossible to run a long script that has hundreds of these role assignments
To Reproduce call
az role assignment create --subscription <sub_id> --role '<any role>' --assignee-object <object_id> --scope /subscriptions/<sub_id>
1,000 times, it will randomly fail with the above.
Expected behavior az role assignment completes
Environment summary no idea how this was installed on the AzDevOps agents. Here is the output from az --version though:
This command group is in preview. It may be changed/removed in a future release.
WARNING: You have 2 updates available. Consider updating your CLI installation. Instructions can be found at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
azure-cli 2.0.77 *
command-modules-nspkg 2.0.3
core 2.0.77 *
nspkg 3.0.4
telemetry 1.0.4
Python location '/opt/az/bin/python3'
Extensions directory '/data/vsts-agent/_work/_temp/.azclitask/cliextensions'
Python (Linux) 3.6.5 (default, Nov 22 2019, 05:32:09)
[GCC 7.4.0]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Incremental redeployment of an ARM Template with Role ...
To resolve this issue, we need ensure that each deployment to a different resource group uses a different GUID for the role assignment, ......
Read more >Assign Azure roles using Azure Resource Manager templates
This article describes how to assign roles using templates. Note. Bicep is a new language for defining your Azure resources.
Read more >Troubleshooting Windows Devices: Workspace ONE ...
Use these steps to identify the reasons why a profile failed to install. ☐Check Event Viewer logs for a 404 failure message: App...
Read more >Stripe API reference – curl
By default, the Stripe API Docs demonstrate using curl to interact with the ... The payment error encountered in the previous PaymentIntent confirmation....
Read more >Release Notes for Cisco Identity Services Engine, Release 3.1
In Cisco ISE, you can now work around this problem by configuring Cisco ISE to use a unique device identifier called GUID instead...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also encountered this today using terraform
What is the scope of uniqueness of the roleAssignmentID? I’m frequently seeing these error messages too, but in the ARM template, I’ve set role assignment
'name' = "[guid(concat(resourceGroup().id, 'some-string-here'))]"
Since this depends on the resource group in the current deployment, is it possible that there’s a hash conflict with the role assignment id of some other resource group which is already present in the subscription?