0
0
Azurecloud~10 mins

Built-in roles (Owner, Contributor, Reader) in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to assign the Reader role to a user in Azure CLI.

Azure
az role assignment create --assignee user@example.com --role [1] --scope /subscriptions/00000000-0000-0000-0000-000000000000
Drag options to blanks, or click blank then click option'
AContributor
BReader
COwner
DAdmin
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Owner' or 'Contributor' instead of 'Reader' for read-only access.
Using a non-existent role like 'Admin'.
2fill in blank
medium

Complete the code to assign the Owner role to a service principal in Azure CLI.

Azure
az role assignment create --assignee spn-1234 --role [1] --scope /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup
Drag options to blanks, or click blank then click option'
AReader
BContributor
COwner
DUser Access Administrator
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Contributor' which lacks permission to manage access.
Using 'Reader' which only allows viewing.
3fill in blank
hard

Fix the error in the command to assign the Contributor role to a user.

Azure
az role assignment create --assignee user@example.com --role [1] --scope /subscriptions/00000000-0000-0000-0000-000000000000
Drag options to blanks, or click blank then click option'
AContributor
BOwner
CReader
DAdmin
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Admin' which is not a built-in role.
Using 'Reader' which only allows viewing.
4fill in blank
hard

Fill both blanks to create a role assignment for a user with the Contributor role on a resource group.

Azure
az role assignment create --assignee [1] --role [2] --scope /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup
Drag options to blanks, or click blank then click option'
Auser@example.com
BReader
CContributor
DOwner
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Reader' role when changes are needed.
Using a wrong assignee format.
5fill in blank
hard

Fill all three blanks to assign the Owner role to a service principal on a subscription.

Azure
az role assignment create --assignee [1] --role [2] --scope [3]
Drag options to blanks, or click blank then click option'
Aspn-5678
BOwner
C/subscriptions/00000000-0000-0000-0000-000000000000
DContributor
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Contributor' instead of 'Owner' for full access.
Using resource group scope instead of subscription scope.