Adding additional role assigments, resource group? #199
-
I'm following along the guide on Adding additional role assigments and it is a little confusing: for the last part about # Resource group scope level assignment, there is no mention or explanation about which resource group this refers to? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Thanks for the feedback @baatch! Happy to make this easier to understand but before doing so I need some more feedback from you. :) In this section we are creating a service principle as well as a Below, we are just providing all the commands required to create a role assignments at Resource Scope, Resource Group and sub-resource level. For simplicity reasons, we have the same commands in all our repos. A user now needs to look into the table to understand at what scope the role assignment must be created (in this case Resource Scope) and then pick the right command (Azure CLI or PowerShell). Finally, the user must insert the details into the sample command and execute it. In this scenario, you must select the command for a Resource Scope level role assignment. Hence, you must select the following Azure CLI command: # Resource Scope level assignment
az role assignment create \
--assignee "{servicePrincipalObjectId}" \
--role "{roleName}" \
--scopes "{scope}" OR the following PowerShell command: # For Resource Scope level assignment
New-AzRoleAssignment `
-ObjectId $spObjectId `
-RoleDefinitionName "{roleName}" `
-Scope "{scope}" Then you must replace some of the placeholders. Let's use PowerShell as an example: # For Resource Scope level assignment
New-AzRoleAssignment `
-ObjectId "{your-sp-object-id}" `
-RoleDefinitionName "User Access Administrator" `
-Scope "/subscriptions/{your-data-management-zone-subscriptionId}" Finally, you execute the command to add the role assignment. What can we improve in detail to make this easier consumable? |
Beta Was this translation helpful? Give feedback.
Thanks for the feedback @baatch! Happy to make this easier to understand but before doing so I need some more feedback from you. :)
In this section we are creating a service principle as well as a
Contributor
role assignment to the subscription. In this section we are asking users to create an additionalUser Access Administrator
role assignment of the same service principle to the same subscription.Below, we are just providing all the commands required to create a role assignments at Resource Scope, Resource Group and sub-resource level. For simplicity reasons, we have the same commands in all our repos. A user now needs to look into the table to understand at what scope the role assign…