Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Last active December 17, 2018 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/220d66eb560e97ccc3fd11c46a53a806 to your computer and use it in GitHub Desktop.
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/
# 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