Using Console
Using CLI
<user-object-id>
with the Object ID of the user you want to remove. Repeat this command for each user you want to remove.
<user-object-id>
with the Object ID of the user you want to assign the role to. Repeat this command for each user as needed.
Using Python
<subscription_id>
with the actual subscription ID and <scope>
with the appropriate scope (e.g., resource group, subscription, etc.) where the Administrator access needs to be removed.
<principal_id>
with the ID of the user or service principal, <role_assignment_name>
with a unique name for the role assignment, and <roleDefinitionId>
with the ID of the desired role definition.