Last active
March 8, 2019 06:17
-
-
Save darrenjrobinson/204cca2000558e6f01a50bda7c2c29e2 to your computer and use it in GitHub Desktop.
Get SailPoint IdentityNow Access Profiles. Associated Blog Post https://blog.darrenjrobinson.com/creating-sailpoint-identitynow-access-profiles-via-api-and-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
# IdentityNow Orgname | |
$orgname = "yourOrg" | |
# Access Profiles | |
$GetProfilesListBaseURI = "https://$($orgName).api.identitynow.com/v2/access-profiles" | |
# Update Profile | |
$UpdateProfilesListBaseURI = "https://$($orgName).api.identitynow.com/v2/access-profiles" | |
# Get Profile Entitlements | |
$GetProfileEntitlementsBaseURI = "https://$($orgName).api.identitynow.com/v2/access-profiles" | |
# Existing Profiles | |
$existingProfiles = Invoke-RestMethod -method Get -uri $GetProfilesListBaseURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"} | |
write-host -ForegroundColor green "$($existingProfiles.Count) Profiles found" | |
foreach ($profile in $existingProfiles){ | |
write-host -ForegroundColor Yellow "For profile $($profile.description), approval is $($profile.approvalSchemes) and requestable is $($profile.requestable)" | |
# Get Profile Entitlments | |
$profileEntitlements = Invoke-RestMethod -method Get -uri "$($GetProfileEntitlementsBaseURI)/$($profile.id)/entitlements" -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"} | |
foreach ($entitlement in $profileEntitlements){ | |
write-host -ForegroundColor Cyan "$($profile.description) has entitlement $($entitlement.description) from $($entitlement.applicationName)" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment