Skip to content

Deploying Rbac to Management via bicep. #3544

Answered by StefanIvemo
pattisanta asked this question in Q&A
Discussion options

You must be logged in to vote

You need to adjust your template to be able to assign roles to a management group. The error message you get :[{"code":"InvalidRoleDefinitionId","message":"The role definition ID 'Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635' is not valid."}] gives us a couple of clues to the issue.

If you look at your template and how you get the Role Definition ID using the existing function, the resourceId returned from roleDef.id differs depending on the scope where you perform the deployment. If you have a template that looks like this and deploy it to a resource group.

targetScope = 'resourceGroup'

param roleDefinitinGuid string = '8e3af657-a8ff-443c-a75c-2fe8c4bcb635'

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@pattisanta
Comment options

@alex-frankel
Comment options

Comment options

You must be logged in to vote
1 reply
@pattisanta
Comment options

Comment options

You must be logged in to vote
3 replies
@pattisanta
Comment options

@StefanIvemo
Comment options

@HariRajan2014
Comment options

Answer selected by pattisanta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants