Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
You can’t perform that action at this time.