Skip to content

Commit 8a8a03e

Browse files
committed
[Azure AD PIM] correcting PowerShell
1 parent d5f4772 commit 8a8a03e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

articles/active-directory/privileged-identity-management/powershell-for-azure-ad-roles.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.devlang: na
1313
ms.topic: article
1414
ms.tgt_pltfrm: na
1515
ms.workload: identity
16-
ms.date: 04/28/2020
16+
ms.date: 05/11/2020
1717
ms.author: curtand
1818
ms.custom: pim
1919
ms.collection: M365-identity-device-management
@@ -121,9 +121,8 @@ There are four main objects in the setting. Only three of these objects are curr
121121

122122
To update the role setting, you will need to first define a setting object as follows:
123123

124-
$setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting
125-
$setting.RuleIdentifier = "JustificationRule"
126-
$setting.Setting = "{'required':false}"
124+
$setting = Get-AzureADMSPrivilegedRoleSetting -ProviderId 'aadRoles' -Filter "roleDefinitionId eq 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'"
125+
$setting.userMemberSetting.justificationRule = "{'required':false}"
127126

128127
You can then go ahead and apply the setting to one of the objects for a particular role as shown below. The ID here is the role setting ID that can be retrieved from the result of the list role settings cmdlet.
129128

0 commit comments

Comments
 (0)