Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Last active March 8, 2019 06:19
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/3ea972f1e4ca7d49b4099ad570796d9d to your computer and use it in GitHub Desktop.
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/
# 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