Skip to content

Commit 0175ecf

Browse files
Merge pull request #266575 from rolyon/rolyon-rbac-elevate-access-list-role-assignments-root-scope
[Azure RBAC] Perform steps at root scope and add tabs
2 parents 259c0dc + 4e584a6 commit 0175ecf

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

articles/lighthouse/how-to/monitor-delegation-changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ az role assignment create --assignee 00000000-0000-0000-0000-000000000000 --role
6161

6262
### Remove elevated access for the Global Administrator account
6363

64-
After you've assigned the Monitoring Reader role at root scope to the desired account, be sure to [remove the elevated access](../../role-based-access-control/elevate-access-global-admin.md#remove-elevated-access) for the Global Administrator account, as this level of access will no longer be needed.
64+
After you've assigned the Monitoring Reader role at root scope to the desired account, be sure to [remove the elevated access](../../role-based-access-control/elevate-access-global-admin.md) for the Global Administrator account, as this level of access will no longer be needed.
6565

6666
## View delegation changes in the Azure portal
6767

articles/role-based-access-control/elevate-access-global-admin.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rolyon
66
manager: amycolannino
77
ms.service: role-based-access-control
88
ms.topic: how-to
9-
ms.date: 02/09/2024
9+
ms.date: 02/16/2024
1010
ms.author: rolyon
1111
ms.custom: devx-track-azurepowershell, devx-track-azurecli
1212
---
@@ -35,9 +35,11 @@ You should remove this elevated access once you have made the changes you need t
3535

3636
![Elevate access](./media/elevate-access-global-admin/elevate-access.png)
3737

38-
## Azure portal
38+
## Perform steps at root scope
3939

40-
### Elevate access for a Global Administrator
40+
# [Azure portal](#tab/azure-portal)
41+
42+
### Step 1: Elevate access for a Global Administrator
4143

4244
Follow these steps to elevate access for a Global Administrator using the Azure portal.
4345

@@ -78,7 +80,7 @@ Follow these steps to elevate access for a Global Administrator using the Azure
7880

7981
1. Perform the steps in the following section to remove your elevated access.
8082

81-
### Remove elevated access
83+
### Step 2: Remove elevated access
8284

8385
To remove the User Access Administrator role assignment at root scope (`/`), follow these steps.
8486

@@ -99,13 +101,15 @@ To remove the User Access Administrator role assignment at root scope (`/`), fol
99101
> [!NOTE]
100102
> If you're using [Privileged Identity Management](../active-directory/privileged-identity-management/pim-configure.md), deactivating your role assignment does not change the **Access management for Azure resources** toggle to **No**. To maintain least privileged access, we recommend that you set this toggle to **No** before you deactivate your role assignment.
101103
102-
## Azure PowerShell
104+
# [PowerShell](#tab/powershell)
105+
106+
### Step 1: Elevate access for a Global Administrator
103107

104-
[!INCLUDE [az-powershell-update](../../includes/updated-for-az.md)]
108+
Use the Azure portal or REST API to elevate access for a Global Administrator.
105109

106-
### List role assignment at root scope (/)
110+
### Step 2: List role assignment at root scope (/)
107111

108-
To list the User Access Administrator role assignment for a user at root scope (`/`), use the [Get-AzRoleAssignment](/powershell/module/az.resources/get-azroleassignment) command.
112+
Once you have elevated access, to list the User Access Administrator role assignment for a user at root scope (`/`), use the [Get-AzRoleAssignment](/powershell/module/az.resources/get-azroleassignment) command.
109113

110114
```azurepowershell
111115
Get-AzRoleAssignment | where {$_.RoleDefinitionName -eq "User Access Administrator" `
@@ -124,7 +128,7 @@ ObjectType : User
124128
CanDelegate : False
125129
```
126130

127-
### Remove elevated access
131+
### Step 3: Remove elevated access
128132

129133
To remove the User Access Administrator role assignment for yourself or another user at root scope (`/`), follow these steps.
130134

@@ -137,9 +141,9 @@ To remove the User Access Administrator role assignment for yourself or another
137141
-RoleDefinitionName "User Access Administrator" -Scope "/"
138142
```
139143
140-
## Azure CLI
144+
# [Azure CLI](#tab/azure-cli)
141145
142-
### Elevate access for a Global Administrator
146+
### Step 1: Elevate access for a Global Administrator
143147
144148
Use the following basic steps to elevate access for a Global Administrator using the Azure CLI.
145149
@@ -155,9 +159,9 @@ Use the following basic steps to elevate access for a Global Administrator using
155159
156160
1. Perform the steps in a later section to remove your elevated access.
157161
158-
### List role assignment at root scope (/)
162+
### Step 2: List role assignment at root scope (/)
159163
160-
To list the User Access Administrator role assignment for a user at root scope (`/`), use the [az role assignment list](/cli/azure/role/assignment#az-role-assignment-list) command.
164+
Once you have elevated access, to list the User Access Administrator role assignment for a user at root scope (`/`), use the [az role assignment list](/cli/azure/role/assignment#az-role-assignment-list) command.
161165
162166
```azurecli
163167
az role assignment list --role "User Access Administrator" --scope "/"
@@ -181,7 +185,7 @@ az role assignment list --role "User Access Administrator" --scope "/"
181185
182186
```
183187

184-
### Remove elevated access
188+
### Step 3: Remove elevated access
185189

186190
To remove the User Access Administrator role assignment for yourself or another user at root scope (`/`), follow these steps.
187191

@@ -193,7 +197,7 @@ To remove the User Access Administrator role assignment for yourself or another
193197
az role assignment delete --assignee [email protected] --role "User Access Administrator" --scope "/"
194198
```
195199
196-
## REST API
200+
# [REST API](#tab/rest-api)
197201
198202
### Prerequisites
199203
@@ -205,7 +209,7 @@ You must use the following versions:
205209
206210
For more information, see [API versions of Azure RBAC REST APIs](/rest/api/authorization/versions).
207211
208-
### Elevate access for a Global Administrator
212+
### Step 1: Elevate access for a Global Administrator
209213
210214
Use the following basic steps to elevate access for a Global Administrator using the REST API.
211215
@@ -221,27 +225,27 @@ Use the following basic steps to elevate access for a Global Administrator using
221225

222226
1. Perform the steps in a later section to remove your elevated access.
223227

224-
### List role assignments at root scope (/)
228+
### Step 2: List role assignments at root scope (/)
225229

226-
You can list all of the role assignments for a user at root scope (`/`).
230+
Once you have elevated access, you can list all of the role assignments for a user at root scope (`/`).
227231

228232
- Call [Role Assignments - List For Scope](/rest/api/authorization/role-assignments/list-for-scope) where `{objectIdOfUser}` is the object ID of the user whose role assignments you want to retrieve.
229233

230234
```http
231235
GET https://management.azure.com/providers/Microsoft.Authorization/roleAssignments?api-version=2022-04-01&$filter=principalId+eq+'{objectIdOfUser}'
232236
```
233237

234-
### List deny assignments at root scope (/)
238+
### Step 3: List deny assignments at root scope (/)
235239

236-
You can list all of the deny assignments for a user at root scope (`/`).
240+
Once you have elevated access, you can list all of the deny assignments for a user at root scope (`/`).
237241

238-
- Call GET denyAssignments where `{objectIdOfUser}` is the object ID of the user whose deny assignments you want to retrieve.
242+
- Call [Deny Assignments - List For Scope](/rest/api/authorization/deny-assignments/list-for-scope) where `{objectIdOfUser}` is the object ID of the user whose deny assignments you want to retrieve.
239243

240244
```http
241245
GET https://management.azure.com/providers/Microsoft.Authorization/denyAssignments?api-version=2022-04-01&$filter=gdprExportPrincipalId+eq+'{objectIdOfUser}'
242246
```
243247

244-
### Remove elevated access
248+
### Step 4: Remove elevated access
245249

246250
When you call `elevateAccess`, you create a role assignment for yourself, so to revoke those privileges you need to remove the User Access Administrator role assignment for yourself at root scope (`/`).
247251

@@ -332,6 +336,8 @@ When you call `elevateAccess`, you create a role assignment for yourself, so to
332336
DELETE https://management.azure.com/providers/Microsoft.Authorization/roleAssignments/11111111-1111-1111-1111-111111111111?api-version=2022-04-01
333337
```
334338
339+
---
340+
335341
## View elevate access log entries in the Directory Activity logs
336342
337343
When access is elevated, an entry is added to the logs. As a Global Administrator in Microsoft Entra ID, you might want to check when access was elevated and who did it. Elevate access log entries do not appear in the standard activity logs, but instead appear in the Directory Activity logs. This section describes different ways that you can view the elevate access log entries.

0 commit comments

Comments
 (0)