Issue with Azure management group deployment

Microsoft

I am trying to deploy a nested management group and facing issues with the deployment. I am trying the deployment using my own ID(user1) and an app registration account(user2) and both have the same rights on the root management group. The hierarchy is supposed to be be created underneath the root management group.

Issue 1: I deployed the bicep file for management group from VS code with user1. The management group hierarchy is created. However if I delete the management group and try to deploy the same bicep file with user2, I am getting the below error:
New-AzManagementGroupDeployment: 16.34.45 - The deployment 'Managementgroupdeployment' failed with error(s). Showing 1 out of 1 error(s).
Status Message: There are existing role assignments on this Management Group scope belonging to a different Principal. Please delete the existing role assignments or select a different Id for the Management Group. (Code:OK)

I cannot see the management group in the portal. However if I change the name of the management group it deploys fine. If both user have same access permission (Management group contributor and Automation job operator)

Issue 2: When deploying the management (either deploying the bicep file using command line or a github workflow), the deployment hangs, though its creation a management group and getting stuck. I am getting timeout after certain point of time.

0 Replies