Skip to content

Commit 86782f4

Browse files
authored
Merge pull request #114894 from curtand/pim0511
[Azure AD PIM] correcting PowerShell
2 parents f7c155b + c25b25d commit 86782f4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 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
@@ -119,11 +119,10 @@ There are four main objects in the setting. Only three of these objects are curr
119119

120120
[![](media/powershell-for-azure-ad-roles/get-update-role-settings-result.png "Get and update role settings")](media/powershell-for-azure-ad-roles/get-update-role-settings-result.png#lightbox)
121121

122-
To update the role setting, you will need to first define a setting object as follows:
122+
To update the role setting, you must get the existing setting object for a particular role and make changes to it:
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)