Last active
December 17, 2018 00:11
-
-
Save darrenjrobinson/220d66eb560e97ccc3fd11c46a53a806 to your computer and use it in GitHub Desktop.
Enabling SailPoint IdentityNow Roles to be requestable. Associated Blog Post is located here https://blog.darrenjrobinson.com/enabling-requestable-roles-in-sailpoint-identitynow-using-powershell/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Orgname | |
$orgName = "myOrg" | |
# Roles | |
$GetRoleListBaseURI = "https://$($orgName).api.identitynow.com/cc/api/role/list" | |
# Update Role | |
$UpdateRoleListBaseURI = "https://$($orgName).api.identitynow.com/cc/api/role/update" | |
# Existing Roles | |
$existingRoles = Invoke-RestMethod -method Get -uri $GetRoleListBaseURI -WebSession $IDN | |
foreach ($role in $existingRoles.items){ | |
write-host -ForegroundColor Yellow "For the $($role.description) role, Disabled: $($role.disabled), Requestable: $($role.requestable)" | |
$role.requestable = "True" | |
# Update Role to be requestable | |
$updateRole = Invoke-RestMethod -Method Post -uri $UpdateRoleListBaseURI -Body ($role | ConvertTo-Json) -WebSession $IDN | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment