Bird
Raised Fist0
Azurecloud~10 mins

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

Choose your learning style10 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.

Practice

(1/5)
1. Which built-in Azure role allows a user to manage resources but not change access permissions?
easy
A. Contributor
B. Owner
C. Reader
D. User Access Administrator

Solution

  1. Step 1: Understand role permissions

    The Owner role can manage resources and access control, Contributor can manage resources but not access, Reader can only view.
  2. Step 2: Match role to permission

    Since the question asks for managing resources without access control, Contributor fits this description.
  3. Final Answer:

    Contributor -> Option A
  4. Quick Check:

    Manage resources without access control = Contributor [OK]
Hint: Contributor manages resources but not access rights [OK]
Common Mistakes:
  • Confusing Owner with Contributor
  • Thinking Reader can manage resources
  • Assuming User Access Administrator manages resources
2. Which of the following is the correct way to describe the Reader role in Azure?
easy
A. Can manage resources and access permissions
B. Can only view resources without making changes
C. Can create and delete resources but not assign roles
D. Can assign roles but not manage resources

Solution

  1. Step 1: Recall Reader role capabilities

    The Reader role is designed to allow viewing resources only, no changes allowed.
  2. Step 2: Match description to Reader

    Can only view resources without making changes correctly states Reader can only view resources without changes.
  3. Final Answer:

    Can only view resources without making changes -> Option B
  4. Quick Check:

    Reader role = View only [OK]
Hint: Reader role only views resources, no edits allowed [OK]
Common Mistakes:
  • Thinking Reader can edit resources
  • Confusing Reader with Contributor
  • Assuming Reader can assign roles
3. If a user is assigned the Owner role on a resource group, what actions can they perform? Select the best description.
medium
A. View resources only
B. Manage resources but cannot assign roles
C. Manage resources and assign access roles
D. Assign roles but cannot manage resources

Solution

  1. Step 1: Understand Owner role permissions

    The Owner role has full access including managing resources and assigning roles.
  2. Step 2: Compare options to Owner capabilities

    Manage resources and assign access roles correctly states Owner can manage resources and assign access roles.
  3. Final Answer:

    Manage resources and assign access roles -> Option C
  4. Quick Check:

    Owner role = Full control including access management [OK]
Hint: Owner role has full control including access rights [OK]
Common Mistakes:
  • Confusing Owner with Contributor
  • Thinking Owner cannot assign roles
  • Assuming Owner can only view
4. A user with Contributor role tries to assign a new role to another user but gets an error. What is the most likely cause?
medium
A. Contributor role does not have permission to assign roles
B. Contributor role cannot manage resources
C. Contributor role can only view resources
D. Contributor role can assign roles only at subscription level

Solution

  1. Step 1: Review Contributor role permissions

    Contributor can manage resources but cannot assign roles or change access permissions.
  2. Step 2: Identify cause of error

    Since assigning roles requires access management permission, Contributor role lacks this, causing the error.
  3. Final Answer:

    Contributor role does not have permission to assign roles -> Option A
  4. Quick Check:

    Contributor cannot assign roles = Permission denied error [OK]
Hint: Contributor cannot assign roles, only Owner can [OK]
Common Mistakes:
  • Assuming Contributor can assign roles
  • Confusing view-only with Contributor
  • Thinking Contributor can assign roles at subscription only
5. You want to give a team member full control over a resource group, including managing resources and access permissions. Which built-in role should you assign?
hard
A. Reader
B. User Access Administrator
C. Contributor
D. Owner

Solution

  1. Step 1: Define required permissions

    Full control means managing resources and access permissions.
  2. Step 2: Match role to permissions

    Owner role includes both managing resources and access control, fitting the requirement.
  3. Step 3: Exclude other roles

    Reader only views, Contributor manages resources but not access, User Access Administrator manages access but not resources.
  4. Final Answer:

    Owner -> Option D
  5. Quick Check:

    Full control = Owner role [OK]
Hint: Owner role grants full control including access management [OK]
Common Mistakes:
  • Choosing Contributor for full control
  • Confusing User Access Administrator with Owner
  • Assuming Reader can manage access
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard