Build a Collection of IdentityNow Roles, Entitlements and Access Profiles for inclusion in a Campaign. Supporting Blog Post can be found here https://blog.darrenjrobinson.com/creating-sailpoint-identitynow-certification-campaigns-using-powershell/
# Campaign Inclusions from Identity Results | |
# Access Profiles, Roles and Entitlments | |
$inclusionList = @() | |
# ROLES | |
foreach ($role in $roles) { | |
$InclusionTemplate = [pscustomobject][ordered]@{ | |
id = $role | |
type = "ROLE" | |
} | |
$inclusionList += $InclusionTemplate | |
} | |
# ENTITLEMENTS | |
foreach ($entitlement in $entitlements) { | |
$InclusionTemplate = [pscustomobject][ordered]@{ | |
id = $entitlement | |
type = "ENTITLEMENT" | |
} | |
$inclusionList += $InclusionTemplate | |
} | |
# ACCESS PROFILES | |
foreach ($accessProfile in $accessProfiles) { | |
$InclusionTemplate = [pscustomobject][ordered]@{ | |
id = $accessProfile | |
type = "ACCESS_PROFILE" | |
} | |
$inclusionList += $InclusionTemplate | |
} | |
$e = $inclusionList | select-object -Property type | Where-Object {$_.type -eq "ENTITLEMENT"} | |
$a = $inclusionList | select-object -Property type | Where-Object {$_.type -eq "ACCESS_PROFILE"} | |
$r = $inclusionList | select-object -Property type | Where-Object {$_.type -eq "ROLE"} | |
write-host -ForegroundColor Blue "Campaign scope covers $($r.type.count) Role(s), $($e.type.count) Entitlement(s) and $($a.type.count) Access Profile(s)." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment