Last active
March 8, 2019 06:19
-
-
Save darrenjrobinson/3ea972f1e4ca7d49b4099ad570796d9d to your computer and use it in GitHub Desktop.
Get IdentityNow Identity Account ID for Access Profile Creation. 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 Organisation | |
$org = "myOrgname" | |
# Search Identities | |
$searchBaseURI = "https://$($org).api.identitynow.com/cc/api/user/list?" | |
$utime = [int][double]::Parse((Get-Date -UFormat %s)) | |
$userSearch = "darren.robinson@customer.com.au" | |
$userSearchEncoded = [System.Web.HttpUtility]::UrlEncode($userSearch) | |
$searchFiltersEncoded = [System.Web.HttpUtility]::UrlEncode($newRequestFilter) | |
$sortersRequest = @{"property" ="name"; "direction" ="ASC"} | convertto-json | |
$sortersRequestEncoded = [System.Web.HttpUtility]::UrlEncode(($sortersRequest)) | |
$userSearchURI = "$($searchBaseURI)_dc=$($utime)&query=$($userSearchEncoded)&filters=$($searchFiltersEncoded)&limit=100&page=1&start=0&sorters=$($sortersRequestEncoded)" | |
$accessProfileOwner = Invoke-RestMethod -Method Get -Uri $userSearchURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)" } | |
$profileOwnerID = $accessProfileOwner.items.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment