Skip to content

Commit 74c9acb

Browse files
authored
Merge pull request MicrosoftDocs#280 from msewaweru/manage-resources-sdk-v2-updates
Updates to entitlement management as per SDK v2 & freshness pass
2 parents 252bbd2 + a3c4c3d commit 74c9acb

File tree

1 file changed

+37
-27
lines changed

1 file changed

+37
-27
lines changed

microsoftgraph/docs-conceptual/tutorial-entitlement-management.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Manage access to resources in Azure AD entitlement management using Micr
33
description: "Learn how to manage access to resources in Azure Active Directory (Azure AD) entitlement management using Microsoft Graph PowerShell."
44

55
ms.topic: tutorial
6-
ms.date: 04/06/2022
6+
ms.date: 05/19/2023
77
ms.author: eunicewaweru
88
manager: CelesteDG
99
author: msewaweru
@@ -23,11 +23,7 @@ To successfully complete this tutorial, make sure you have the required prerequi
2323
1. To use the Azure AD entitlement management, you must have one of the following licenses:
2424
- Azure AD Premium P2
2525
- Enterprise Mobility + Security (EMS) E5 license
26-
1. Entitlement management is available in the beta version of Microsoft Graph PowerShell. Run the following command to set your profile to beta.
27-
28-
```powershell
29-
Select-MgProfile -Name 'beta'
30-
```
26+
1. Entitlement management is available in the beta module of Microsoft Graph PowerShell. Ensure that you have both Microsoft.Graph and Microsoft.Graph.Beta modules installed.
3127

3228
1. Microsoft Graph PowerShell using a global administrator role and the appropriate permissions. The `User.ReadWrite.All`, `Group.ReadWrite.All`, and `EntitlementManagement.ReadWrite.All` delegated permissions are required. To set the permissions in Microsoft Graph PowerShell, run;
3329

@@ -71,23 +67,23 @@ New-MgGroup -DisplayName 'Marketing resources' -Description 'Marketing resources
7167
```
7268

7369
```Output
74-
Id DisplayName Description GroupTypes AccessType
75-
-- ----------- ----------- ---------- ----------
70+
Id DisplayName Description GroupTypes
71+
-- ----------- ----------- ----------
7672
87553228-0d72-4138-890b-36e683f883b7 Marketing resources Marketing resources {}
7773
```
7874

7975
## Step 2: Add resources to a catalog and create an access package
8076

81-
An *access package** is a bundle of resources that a team or project needs and is governed by policies. Access packages are defined in containers called catalogs. Catalogs can reference resources such as groups, apps and sites that are used in the access package.
77+
An **access package** is a bundle of resources that a team or project needs and is governed by policies. Access packages are defined in containers called catalogs. Catalogs can reference resources such as groups, apps and sites that are used in the access package.
8278

8379
In this step, create a **Marketing Campaign** access package in the `General` catalog.
8480

8581
### Get the catalog identifier
8682

87-
To add resources to a catalog, you must first get its identifier. If you're using the general catalog, run the following command to get its ID. If you're using a different catalog, change the filter value in the request to the name of your catalog. Record the returned **Id** property to use later.
83+
To add resources to a catalog, you must first get its identifier. If you're using the general catalog, run the following command to get its Id. If you're using a different catalog, change the filter value in the request to the name of your catalog. Record the returned **Id** property to use later.
8884

8985
```powershell
90-
Get-MgEntitlementManagementAccessPackageCatalog -Filter "DisplayName eq 'General'" |
86+
Get-MgBetaEntitlementManagementAccessPackageCatalog -Filter "DisplayName eq 'General'" |
9187
Format-List
9288
```
9389

@@ -116,7 +112,7 @@ The output should only contain the catalog whose name you provided in the reques
116112

117113
To add the group that you created to the catalog, provide the following property values:
118114

119-
- **CatalogId** - Specifies the ID of the catalog that you're using.
115+
- **CatalogId** - Specifies the Id of the catalog that you're using.
120116
- **RequestType** - Set to `AdminAdd`.
121117
- **AccessPackageResource** - Represents the resource. This resource should contain two properties: **OriginSystem** should be `AadGroup` and **OriginId** is the identifier of the group.
122118

@@ -126,7 +122,7 @@ $accessPackageResource = @{
126122
OriginId= "87553228-0d72-4138-890b-36e683f883b7"
127123
}
128124
129-
New-MgEntitlementManagementAccessPackageResourceRequest -CatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -RequestType "AdminAdd" -AccessPackageResource $accessPackageResource | Format-List
125+
New-MgBetaEntitlementManagementAccessPackageResourceRequest -CatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -RequestType "AdminAdd" -AccessPackageResource $accessPackageResource | Format-List
130126
```
131127

132128
```Output
@@ -151,7 +147,7 @@ The request state indicates the outcome of whether the service was able to add t
151147
In later steps, you'll need the **Id** that was assigned to the group resource in the catalog. This identifier represents the group as a resource in the catalog and is different from the group identifier itself in Microsoft Graph PowerShell. To get the resource, provide the **Id** of the catalog and filter by the display name of the group.
152148

153149
```powershell
154-
Get-MgEntitlementManagementAccessPackageCatalogAccessPackageResource -AccessPackageCatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -Filter "DisplayName eq 'Marketing resources'" | Format-List
150+
Get-MgBetaEntitlementManagementAccessPackageCatalogAccessPackageResource -AccessPackageCatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -Filter "DisplayName eq 'Marketing resources'" | Format-List
155151
```
156152

157153
```Output
@@ -179,7 +175,7 @@ The access package assigns users to the roles of a resource. The typical role of
179175
In this command, use the **Id** of the catalog and the **Id** of the group resource you recorded in the previous step to get the **OriginId** of the member resource role.
180176

181177
```powershell
182-
Get-MgEntitlementManagementAccessPackageCatalogAccessPackageResourceRole -AccessPackageCatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -Filter "originSystem eq 'AadGroup' and accessPackageResource/id eq '0a358d7b-42d9-48c5-8455-df23dcaff2ad' and DisplayName eq 'Member'"
178+
Get-MgBetaEntitlementManagementAccessPackageCatalogAccessPackageResourceRole -AccessPackageCatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -Filter "originSystem eq 'AadGroup' and accessPackageResource/id eq '0a358d7b-42d9-48c5-8455-df23dcaff2ad' and DisplayName eq 'Member'"
183179
```
184180

185181
```Output
@@ -195,7 +191,7 @@ If successful, a single record is returned which represents the member role of t
195191
At this point, you have a catalog with a group resource, and you know that you'll use the resource role of group member in the access package. The next step is to create the access package. After creating the access package, you can add the resource role to it and create a policy for how users can request access to that resource role. You use the **Id** of the catalog that you recorded earlier to create the access package. Record the **Id** of the access package to use later. In this step, you create a **Marketing Campaign** access package in the General catalog.
196192

197193
```powershell
198-
New-MgEntitlementManagementAccessPackage -CatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -DisplayName 'Marketing Campaign'|
194+
New-MgBetaEntitlementManagementAccessPackage -CatalogId '88d3e491-5247-4209-9b56-c4c95d9694e9' -DisplayName 'Marketing Campaign'|
199195
Format-List
200196
```
201197

@@ -243,7 +239,7 @@ $accessPackageResourceScope = @{
243239
"originSystem" ='AadGroup'
244240
}
245241
246-
New-MgEntitlementManagementAccessPackageResourceRoleScope -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726' -AccessPackageResourceRole $accessPackageResourceRole -AccessPackageResourceScope $accessPackageResourceScope | Format-List
242+
New-MgBetaEntitlementManagementAccessPackageResourceRoleScope -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726' -AccessPackageResourceRole $accessPackageResourceRole -AccessPackageResourceScope $accessPackageResourceScope | Format-List
247243
```
248244

249245
```Output
@@ -290,7 +286,7 @@ $requestApprovalSettings = @{
290286
"approvalStages"= '[]'
291287
}
292288
293-
New-MgEntitlementManagementAccessPackageAssignmentPolicy -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726' -DisplayName 'Specific users' -Description 'Specific users can request assignment' -DurationInDays 30 -RequestorSettings $requestorSettings -RequestApprovalSettings $requestApprovalSettings | Format-List
289+
New-MgBetaEntitlementManagementAccessPackageAssignmentPolicy -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726' -DisplayName 'Specific users' -Description 'Specific users can request assignment' -DurationInDays 30 -RequestorSettings $requestorSettings -RequestApprovalSettings $requestApprovalSettings | Format-List
294290
```
295291

296292
```Output
@@ -326,7 +322,13 @@ To request access, you need to provide these values:
326322
- **RequestType** - Specifies the type of request. For a non-administrator user to request to create their own assignment for either a first assignment or renew assignment, the value of the requestType property is `UserAdd`.
327323

328324
```powershell
329-
New-MgEntitlementManagementAccessPackageAssignmentRequest -RequestType 'UserAdd' -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726' -AssignmentPolicyId '4acf0d48-49b1-495b-816e-58933c9a9e64' -TargetId '6c42590f-fcf0-4922-bac6-205f7c6aa89c'
325+
New-MgBetaEntitlementManagementAccessPackageAssignmentRequest -RequestType 'UserAdd' -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726' -AssignmentPolicyId '4acf0d48-49b1-495b-816e-58933c9a9e64' -TargetId '6c42590f-fcf0-4922-bac6-205f7c6aa89c'
326+
```
327+
328+
```Output
329+
Id CompletedDate CreatedDateTime ExpirationDateTime IsValidationOnly Justification RequestState RequestStatus RequestType
330+
-- ------------- --------------- ------------------ ---------------- ------------- ------------ ------------- -----------
331+
bff7d893-dc69-4f69-ae9f-24ce60531c37 False Submitted Accepted UserAdd
330332
```
331333

332334
## Step 4: Validate that access has been assigned
@@ -339,10 +341,8 @@ Use the administrator account to see the status of the request.
339341

340342
Use the **Id** property of the request to get the current status of it. The request state should be `Delivered` and request status `Fulfilled`.
341343

342-
Run `Get-MgEntitlementManagementAccessPackageAssignmentRequest` first to get the AccessPackageAssignmentRequestId for your request based on the `CreatedDateTime`.
343-
344344
```powershell
345-
Get-MgEntitlementManagementAccessPackageAssignmentRequest -AccessPackageAssignmentRequestId '2276a78f-b1a1-471c-b69f-04649b2aaa92'| Format-List
345+
Get-MgBetaEntitlementManagementAccessPackageAssignmentRequest -AccessPackageAssignmentRequestId '2276a78f-b1a1-471c-b69f-04649b2aaa92'| Format-List
346346
```
347347

348348
```Output
@@ -368,7 +368,7 @@ AdditionalProperties : {[@odata.context, https://graph.microsoft.com/beta/$me
368368
Use the **Id** of the access package policy that you created to see that resources have been assigned to the **Requestor1** user account.
369369

370370
```powershell
371-
Get-MgEntitlementManagementAccessPackageAssignment -Filter "(AccessPackageAssignmentPolicy/Id eq '4acf0d48-49b1-495b-816e-58933c9a9e64')" | Format-List
371+
Get-MgBetaEntitlementManagementAccessPackageAssignment -Filter "(AccessPackageAssignmentPolicy/Id eq '4acf0d48-49b1-495b-816e-58933c9a9e64')" | Format-List
372372
```
373373

374374
```Output
@@ -413,23 +413,29 @@ In this step, remove the changes you made and delete the **Marketing Campaign**
413413
You must delete any assignments to the access package before you can delete it. Use the **Id** of the assignment request that you recorded to delete the access package itself.
414414

415415
```powershell
416-
New-MgEntitlementManagementAccessPackageAssignmentRequest -RequestType 'AdminRemove' -AccessPackageAssignmentId 'eff960a2-6b20-4611-81c2-cb3d183584d9'
416+
New-MgBetaEntitlementManagementAccessPackageAssignmentRequest -RequestType 'AdminRemove' -AccessPackageAssignmentId 'eff960a2-6b20-4611-81c2-cb3d183584d9'
417+
```
418+
419+
```Output
420+
Id CompletedDate CreatedDateTime ExpirationDateTime IsValidationOnly Justification RequestState RequestStatus RequestType
421+
-- ------------- --------------- ------------------ ---------------- ------------- ------------ ------------- -----------
422+
8b8e68a8-609c-4535-a9fd-f49713e46e6f False Submitted Accepted AdminRemove
417423
```
418424

419425
### Delete the access package assignment policy
420426

421427
To delete the assignment policy, use the **Id** of the assignment policy that you previously recorded. Make sure all assignments are removed first.
422428

423429
```powershell
424-
Remove-MgEntitlementManagementAccessPackageAssignmentPolicy -AccessPackageAssignmentPolicyId '4acf0d48-49b1-495b-816e-58933c9a9e64'
430+
Remove-MgBetaEntitlementManagementAccessPackageAssignmentPolicy -AccessPackageAssignmentPolicyId '4acf0d48-49b1-495b-816e-58933c9a9e64'
425431
```
426432

427433
### Delete the access package
428434

429-
Use the **id** of the access package that you previously recorded to delete it.
435+
Use the **Id** of the access package that you previously recorded to delete it.
430436

431437
```powershell
432-
Remove-MgEntitlementManagementAccessPackage -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726'
438+
Remove-MgBetaEntitlementManagementAccessPackage -AccessPackageId '08173ced-8eae-4023-8433-cb85f29e7726'
433439
```
434440

435441
### Delete the user account
@@ -447,3 +453,7 @@ Delete the **Marketing resources** group.
447453
```powershell
448454
Remove-MgGroup -GroupId '87553228-0d72-4138-890b-36e683f883b7'
449455
```
456+
457+
## Next steps
458+
459+
- Learn more on [entitlement management](/azure/active-directory/governance/entitlement-management-overview).

0 commit comments

Comments
 (0)