Skip to content

Commit a04a90f

Browse files
committed
Add portal instructions for SP permissions
1 parent 61bbf46 commit a04a90f

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

articles/lab-services/how-to-attach-detach-shared-image-gallery.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This article shows how to attach or detach an Azure compute gallery to a lab pla
1919
> [!IMPORTANT]
2020
> To show a virtual machine image in the list of images during lab creation, you need to replicate the compute gallery image to the same region as the lab plan. You need to manually [replicate images](../virtual-machines/shared-image-galleries.md) to other regions in the compute gallery.
2121
22-
Saving images to a compute gallery and replicating those images incurs additional cost. This cost is separate from the Azure Lab Services usage cost. Learn more about [Azure Compute Gallery pricing](../virtual-machines/azure-compute-gallery.md#billing).
22+
Saving images to a compute gallery and replicating those images incurs extra cost. This cost is separate from the Azure Lab Services usage cost. Learn more about [Azure Compute Gallery pricing](../virtual-machines/azure-compute-gallery.md#billing).
2323

2424
## Prerequisites
2525

@@ -76,19 +76,18 @@ If you already have an Azure compute gallery, you can also attach it to your lab
7676

7777
### Configure compute gallery permissions
7878

79-
The Azure Lab Services service principal needs to have the Owner Azure RBAC role on the Azure compute gallery. There are two Azure Lab Services service principals:
79+
The Azure Lab Services service principal needs to have the [Owner](/azure/role-based-access-control/built-in-roles#owner) Azure RBAC role on the Azure compute gallery. There are two Azure Lab Services service principals:
8080

8181
| Name | Application ID | Description |
8282
| ---- | ----- | ---- |
8383
| Azure Lab Services | c7bb12bf-0b39-4f7f-9171-f418ff39b76a | Service principal for Azure Lab Services lab plans (V2). |
8484
| Azure Lab Services | 1a14be2a-e903-4cec-99cf-b2e209259a0f | Service principal for Azure Lab Services lab accounts (V1). |
8585

86-
To attach a compute gallery to a lab plan, assign the Owner role to the service principal with application ID `c7bb12bf-0b39-4f7f-9171-f418ff39b76a`.
86+
To attach a compute gallery to a lab plan, assign the [Owner](/azure/role-based-access-control/built-in-roles#owner) role to the service principal with application ID `c7bb12bf-0b39-4f7f-9171-f418ff39b76a`.
8787

8888
If your Azure account is a guest user, your Azure account needs to have the [Directory Readers](/azure/active-directory/roles/permissions-reference#directory-readers) role to perform the role assignment. Learn about [role assignments for guest users](/azure/role-based-access-control/role-assignments-external-users#guest-user-cannot-browse-users-groups-or-service-principals-to-assign-roles).
8989

90-
> [!NOTE]
91-
> When you add a role assignment in the Azure portal, the user interface shows the *object ID* of the service principal, which is different from the *application ID*. The object ID for a service principal can be different in each Azure subscription. You can find the service principal object ID in Azure Active Directory, based on its application ID. Learn more about [Service principal objects](/azure/active-directory/develop/app-objects-and-service-principals#service-principal-object).
90+
# [Azure CLI](#tab/azure-cli)
9291

9392
Follow these steps to grant permissions to the Azure Lab Services service principal by using the Azure CLI:
9493

@@ -120,6 +119,32 @@ Follow these steps to grant permissions to the Azure Lab Services service princi
120119
121120
Replace the text placeholders *`<service-principal-object-id>`* and *`<gallery-id>`* with the outcomes of the previous commands.
122121
122+
# [Azure portal](#tab/portal)
123+
124+
When you add a role assignment in the Azure portal, the user interface shows the *object ID* of the service principal, which is different from the *application ID*. The object ID for a service principal is different in each Azure subscription. Learn more about [Service principal objects](/azure/active-directory/develop/app-objects-and-service-principals#service-principal-object).
125+
126+
Follow these steps to grant permissions to the Azure Lab Services service principal by using the Azure portal:
127+
128+
1. Sign in to the [Azure portal](https://portal.azure.com).
129+
1. In the search box at the top, enter *Enterprise applications*, and select **Enterprise applications** from the services list.
130+
1. On the **All applications** page, remove the **Application type** filter, and enter *c7bb12bf-0b39-4f7f-9171-f418ff39b76a* in the **Application ID starts with** filter.
131+
132+
:::image type="content" source="./media/how-to-attach-detach-shared-image-gallery/lab-services-enterprise-applications.png" alt-text="Screenshot that shows the list of enterprise applications in the Azure portal, highlighting the application ID filter." lightbox="./media/how-to-attach-detach-shared-image-gallery/lab-services-enterprise-applications.png":::
133+
134+
1. Note the **Object ID** value of the Azure Lab Services service principal.
135+
1. Go to your Azure compute gallery resource.
136+
1. Select **Access control (IAM)**, and then select **Add** > **Add role assignment**.
137+
1. On the **Role** page, select the **Owner** role from the list.
138+
1. On the **Members** page, select **Select members**.
139+
1. Enter *Azure Lab Services** in the search box, select both items, and then select **Select**.
140+
1. In the **Add role assignment** page, remove the item that doesn't match the object ID of the Azure Lab Services service principal.
141+
142+
:::image type="content" source="./media/how-to-attach-detach-shared-image-gallery/compute-gallery-add-role-assignment.png" alt-text="Screenshot that shows the add role assignment page for the compute gallery in the Azure portal." lightbox="./media/how-to-attach-detach-shared-image-gallery/compute-gallery-add-role-assignment.png":::
143+
144+
1. On the **Review + Assign** page, select **Review + assign** to add the role assignment to the compute gallery.
145+
146+
---
147+
123148
Learn more about how to [assign an Azure role in Azure role-based access control (Azure RBAC)](/azure/role-based-access-control/role-assignments-steps#step-5-assign-role).
124149
125150
### Attach the compute gallery
62.5 KB
Loading
83.1 KB
Loading

0 commit comments

Comments
 (0)