Skip to main content
Version: Next

Task 02: Assign RBAC Roles

Runbook Azure

DOCUMENT CATEGORY: Runbook SCOPE: RBAC role assignment for Azure Local deployment identities PURPOSE: Assign required roles to the deployment SPN and deployment user at subscription and resource group scope MASTER REFERENCE: Microsoft Learn - Assign Azure Roles

Status: Active Applies To: Phase 03 — RBAC Permissions Last Updated: 2026-03-02


Overview

Assign the required RBAC roles to the Azure Local deployment service principal and deployment user. This is the Permission Transition Point — after completion, the deployment SPN has sufficient permissions for all subsequent phases.

Last Step Requiring Elevated Admin

After assigning these roles, the deployment SPN will have sufficient permissions for all subsequent deployment phases. No further elevated admin access is required.


Prerequisites

  • Active Azure session with Owner or User Access Administrator role at subscription level
  • Task 01: Create Deployment SPN completed — sp-azurelocal-deploy exists in Entra ID
  • Subscription ID confirmed in variables.ymlazure.subscriptions.lab.id
  • Cluster resource group confirmed in variables.ymlazure_resources.resource_group_name

Variables from variables.yml

VariableConfig PathExample (IIC)
Subscription IDazure.subscriptions.lab.id(per environment)
Cluster Resource Groupazure_resources.resource_group_namerg-c01-azl-eus-01

Section 1: Assign RBAC Roles to Service Principal

Assign the required RBAC roles to the deployment service principal created in Task 01. This enables automated deployments using the SPN credentials.

1. Navigate to Subscription IAM

  1. Go to Subscriptions → Select your Azure Local subscription
  2. Click Access control (IAM)

2. Add Role Assignments

For each role, repeat the following:

  1. Click + AddAdd role assignment
  2. In the Role tab — search for and select the role, then click Next
  3. In the Members tab:
  • Select User, group, or service principal
  • Click + Select members
  • Search for sp-azurelocal-deploy
  • Select the service principal → Click Select
  1. Click Review + assign

3. Required Role Assignments

Assign all of the following roles to sp-azurelocal-deploy:

Subscription-level roles:

RolePurpose
ContributorCreate and manage resources
User Access AdministratorAssign RBAC to other identities
Azure Stack HCI AdministratorAzure Local cluster management
ReaderView resources

Resource group-level roles (at the Azure Local cluster resource group, e.g., rg-c01-azl-eus-01):

RolePurpose
Key Vault Data Access AdministratorManage data plane permissions to deployment Key Vault
Key Vault Secrets OfficerRead and write secrets in deployment Key Vault
Key Vault ContributorCreate and manage Key Vault resources for deployment
Storage Account ContributorCreate storage accounts for deployment
Azure Connected Machine OnboardingRegister machines with Azure Arc
Azure Connected Machine Resource AdministratorManage Arc-enabled machine resources
Scope Is the Azure Local Cluster Resource Group

All resource group-level roles MUST be assigned at the cluster resource group:

/subscriptions/<subscription-id>/resourceGroups/<cluster-resource-group>

Example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-c01-azl-eus-01

Do NOT assign these to the platform Key Vault resource group.

Validation

  1. Go to Access control (IAM)Role assignments
  2. Filter by the service principal name
  3. Verify all 10 roles are listed

Section 2: Assign RBAC Roles to Deployment User

If a human user will perform portal-based deployments (in addition to or instead of the SPN), assign the same roles to their user account.

1. Navigate to Subscription IAM

  1. Go to Subscriptions → Select your Azure Local subscription
  2. Click Access control (IAM)

2. Add Role Assignments

For each role, repeat the same process as Section 1, but search for the deployment user's name or email instead of the service principal.

3. Required Role Assignments

Assign the same 10 roles listed in Section 1 (4 subscription-level + 6 resource group-level) to the deployment user.

Validation

  1. Go to Access control (IAM)Role assignments
  2. Filter by the user's name
  3. Verify all 10 roles are listed

Troubleshooting

IssueCauseSolution
Authorization failedInsufficient permissions to assign rolesRequires Owner or User Access Administrator
Role definition not foundRole name typoVerify role name with Get-AzRoleDefinition
Principal does not existSPN or user not foundVerify SPN was created in Task 01
Role assignment already existsRole previously assignedSafe to ignore — script handles idempotently

PreviousUpNext
Task 01 — Create Deployment SPNPhase 03 — RBAC PermissionsPhase 04 — Azure Management Infrastructure

Version Control

  • Created: 2026-01-15 by Azure Local Cloudnology Team
  • Last Updated: 2026-03-02 by Azure Local Cloudnology Team
  • Version: 2.0.0
  • Tags: azure-local, phase-03, rbac, role-assignment
  • Keywords: RBAC, role assignment, sp-azurelocal-deploy, Contributor, Azure Stack HCI Administrator
  • Author: Azure Local Cloudnology Team