Skip to content

Commit 06a4e1c

Browse files
authored
Merge pull request #198178 from dknappettmsft/avd-svmonc-rbac
AVD updated SVMONC to include more rbac clarity and other improvements
2 parents a6b8d2d + 01c2c7e commit 06a4e1c

File tree

3 files changed

+163
-128
lines changed

3 files changed

+163
-128
lines changed

articles/virtual-desktop/autoscale-scaling-plan.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,26 @@ To use scaling plans, make sure you follow these guidelines:
5959

6060
## Create a custom RBAC role in the Azure portal
6161

62-
Before creating your first scaling plan, you'll need to create a custom role-based access control (RBAC) role with your Azure subscription as the assignable scope. Assigning this custom role at any level lower than your subscription, such as the resource group, host pool, or VM, will prevent autoscale from working properly. This custom role and assignment will allow Azure Virtual Desktop to manage the power state of any VMs in your subscription. It will also let the service apply actions on both host pools and VMs when there are no active user sessions. For more information about creating custom roles, see [Azure custom roles](../role-based-access-control/custom-roles.md).
62+
Before creating your first scaling plan, you'll need to create a custom role-based access control (RBAC) role with your Azure subscription as the assignable scope. Assigning this custom role at any level lower than your subscription, such as the resource group, host pool, or VM, will prevent autoscale from working properly. You'll need to add each Azure subscription as an assignable scope that contains host pools and session host VMs you want to use with autoscale. This custom role and assignment will allow Azure Virtual Desktop to manage the power state of any VMs in those subscriptions. It will also let the service apply actions on both host pools and VMs when there are no active user sessions. For more information about creating custom roles, see [Azure custom roles](../role-based-access-control/custom-roles.md).
6363

6464
> [!IMPORTANT]
65-
> You must have the `Microsoft.Authorization/roleAssignments/write` permission on your subscription in order to create and assign the custom role for the service principal on your subscription. This is part of **User Access Administrator** and **Owner** built in roles.
65+
> You must have the `Microsoft.Authorization/roleAssignments/write` permission on your subscriptions in order to create and assign the custom role for the Azure Virtual Desktop service principal on those subscriptions. This is part of **User Access Administrator** and **Owner** built in roles.
6666
67-
To create and assign the custom role on your subscription with the Azure portal:
67+
To create the custom role with the Azure portal:
6868

69-
1. Open the Azure portal and go to **Subscriptions** and select the subscription that contains the host pool you want to use with autoscale.
69+
1. Open the Azure portal and go to **Subscriptions** and select a subscription that contains a host pool and session host VMs you want to use with autoscale.
7070

71-
1. Select **Access control (IAM)**
71+
1. Select **Access control (IAM)**.
7272

73-
1. Select the **+ Add** button, then select **Add custom role** from the drop-down menu, as shown in the following screenshot:
74-
75-
> [!div class="mx-imgBorder"]
76-
> ![A screenshot showing the drop-down menu that appears when you select the plus sign and add button in the Access control (I A M) blade in the Azure portal. The option add custom role is highlighted with a red border.](media/add-custom-role.png)
73+
1. Select the **+ Add** button, then select **Add custom role** from the drop-down menu.
7774

7875
1. Next, on the **Basics** tab, enter a custom role name and add a description. We recommend you name the role *Azure Virtual Desktop Autoscale* with the description *Scales your Azure Virtual Desktop deployment up or down*.
7976

8077
1. For baseline permissions, select **Start from scratch** and select **Next**.
8178

8279
1. On the **Permissions** tab, select Next. You'll add the permissions later on the JSON tab.
8380

84-
1. On the **Assignable scopes** tab, your subscription will be listed. If you also want to assign this custom role to other subscriptions containing host pools, select **Add assignable scopes** and add the relevant subscriptions.
81+
1. On the **Assignable scopes** tab, your subscription will be listed. If you also want to assign this custom role to other subscriptions containing host pools and session host VMs, select **Add assignable scopes** and add the relevant subscriptions.
8582

8683
1. On the **JSON** tab, select **Edit** and add the following permissions to the `"actions": []` array. These entries must be enclosed within the square brackets.
8784

@@ -101,7 +98,7 @@ To create and assign the custom role on your subscription with the Azure portal:
10198
"Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/sendMessage/action"
10299
```
103100

104-
The completed JSON should look like this, with your subscription ID included as an assignable scope:
101+
The completed JSON should look like this, with the subscription ID for each subscription included as assignable scopes:
105102

106103
```json
107104
{
@@ -141,19 +138,23 @@ To create and assign the custom role on your subscription with the Azure portal:
141138

142139
1. Review the configuration and select **Create**. Once the role has been successfully created, select **OK**. Note that it may take a few minutes to display everywhere.
143140

144-
After you've created the custom role, you'll need to assign it to the Azure Virtual Desktop service principal and grant access.
141+
After you've created the custom role, you'll need to assign it to the Azure Virtual Desktop service principal and grant access to each subscription.
145142

146143
## Assign the custom role with the Azure portal
147144

148145
To assign the custom role with the Azure portal to the Azure Virtual Desktop service principal on the subscription your host pool is deployed to:
149146

150-
1. In the **Access control (IAM) tab**, select **Add role assignments**.
147+
1. Sign in to the Azure portal and go to **Subscriptions**. Select a subscription that contains a host pool and session host VMs you want to use with autoscale.
148+
149+
1. Select **Access control (IAM)**.
150+
151+
1. Select the **+ Add** button, then select **Add role assignment** from the drop-down menu.
151152

152153
1. Select the role you just created, for example **Azure Virtual Desktop Autoscale** and select **Next**.
153154

154155
1. On the **Members** tab, select **User, group, or service principal**, then select **+Select members**. In the search bar, enter and select either **Azure Virtual Desktop** or **Windows Virtual Desktop**. Which value you have depends on when the *Microsoft.DesktopVirtualization* resource provider was first registered in your Azure tenant. If you see two entries titled Windows Virtual Desktop, please see the tip below.
155156

156-
1. Select **Review + assign** to complete the assignment.
157+
1. Select **Review + assign** to complete the assignment. Repeat this for any other subscriptions that contain host pools and session host VMs you want to use with autoscale.
157158

158159
> [!TIP]
159160
> The application ID for the service principal is **9cdead84-a844-4324-93f2-b2e6bb768d07**.
@@ -164,7 +165,7 @@ To assign the custom role with the Azure portal to the Azure Virtual Desktop ser
164165
>
165166
> 1. Open [Azure Cloud Shell](../cloud-shell/overview.md) with PowerShell as the shell type.
166167
>
167-
> 1. Get the object ID (which is unique in each Azure tenant) and store it in a variable:
168+
> 1. Get the object ID for the service principal (which is unique in each Azure tenant) and store it in a variable:
168169
>
169170
> ```powershell
170171
> $objId = (Get-AzADServicePrincipal -AppId "9cdead84-a844-4324-93f2-b2e6bb768d07").Id
@@ -190,7 +191,7 @@ To assign the custom role with the Azure portal to the Azure Virtual Desktop ser
190191

191192
## Create a scaling plan
192193

193-
To create a scaling plan:
194+
Now that you've assigned the custom role to the service principal on your subscriptions, you can create a scaling plan. To create a scaling plan:
194195

195196
1. Open the [Azure portal](https://portal.azure.com).
196197

0 commit comments

Comments
 (0)