You would need to get the Access Token then put this into the same Authorization header regardless of the type of auth flow used - Personal token or client credentials, etc.
My team and I actually started exploring updating the endpoints to the beta endpoints as you have after I posted my update. We were able to get the entitlement hash table part updated and working, but we didnât update all of the end points. I see you have done that in your script and it is very much appreciated!
Thank you for sharing this document so quickly and for taking the time to update all of the endpoints that are referenced to also include pagination. Thanks again for sharing, this is something we will definitely utilize going forward!
Can someone provide an example of how I would export more than 250 records for running a command like this one https://{tenant}.api.identitynow.com/v3/accounts?filters=sourceId in (âsourceid 1â,âsourceid 2â)
Whereas the results would return exceeding 10k rows, but for this example. What commands in Postman do I need to run for the each one to get an export of each. I havent got Powershell or anything else and need to be able to do this using Postman. Its not clear to me reading the documentation what I need to do to get more than 250
I donât think Postman is the best tool for that purpose - I could only spot a couple of examples online regarding pagination support in Postman and in most cases the recommendation is to do it in javascript/python or in general, using a more powerful tool.
Is it necessary to use the API for this report? If itâs just accounts you are after, maybe using search via UI is a better way?
In general, in order to get more than 250 results from a single endpoint, you need to query the endpoint more than once. A single query will only ever return 250 results.
In order to get more, you need to keep querying the endpoint until you have all the results you need.
If you insist on using Postman, you would need to query the endpoint once, download the results, then add an offset parameter to your call and keeping doing that until you have all the results. Bear in mind youâll need to download each set of results and stitch them together later manually :).
This page explains pagination in IDN endpoints: Standard Collection Parameters | SailPoint Developer Community
Example:
First call:
/v3/accounts/?filtersâŚ&offset=0
Second call:
/v3/accounts/?filtersâŚ&offset=250
Third call:
/v3/accounts/?filtersâŚ&offset=500
It looks like the BETA/entitlements API is currently âbrokenâ and not returning a cursor as expected. Curious if anyone else has run into this and assuming the code could be updated to use the offset/limit values instead to get this working again?
Hi,
Thanks for share the script. I was able to use this script. But getting an error, when I run the script. Update role is failing with no error information. Any suggestions?
""Replacing source Name with sourceId in roleAssignValue String
Role âMerchandising-Buyersâ update is a Failure
Error:
I have tested v8.0.1 and I can see that is connect to /beta/
But it only return 250 entitlement in total. Was that the intension?
Total number of Entitlements of this source (ID 000000000000000000000): 250
Hi Karsten, unfortunately thatâs because the script uses a cursor which SP have deprecated. Iâll get around to posting an updated version one of these days if needed but @M_rtenHâs code above should provide you with the logic needed if you wish to update the script yourself.
Or you can replicate the code blocks used for get roles and get APs.
Itâs a shame SP have deprecated the cursor as it was quite helpful in keeping code tidy and concise.
Thanks Marten for your response. Actually obtaining the Accounts data from the GUI is just slow to obtain especially when you are tryng to do it for 100+ apps one by one. The search doesnât get the RAW account data we need either and I agree that using Postman and APIs is limited. Unfortunately as I am not a developer by trade and no one else on my team is, we are unable to figure out how to use PowerShell or Python to do the necessary. We literally donât understand what is required software wise and lastly if we obtained the script, what we would need to change to ensure it works against our environment and export it in the format we need it. API was easy for us before the limits applied but at least it was easy enough to use and could be automated without human triggers.
I just wish someone from the Developer community would share us the Alternatives of using APIs with PowerShell and else and provide us with out of the box ready to go packages which we only need to change a few details like tenant and authentication and then viola, job done we are back to normal and we can get what we need.
But unfortunately I donât see that happening and so we will just have to waste time exporting it from the front end GUI and we will over time just re-consider other tools over Sailpoint in the future as they are forever changing what I loved about the tool, but less and less everyday.
Yeah - if youâre building a report for all applications thatâs a different story.
Pagination being enforced on endpoints is fairly standard but itâs a shame thereâs no alternative to do it in bulk via UI for example (i.e standard âAll source accountsâ report that you could run).
I donât have a script ready to share (at least none that would be as plug and play as you describe) but Iâll try to remember if I ever end up needing one.
Trying to build one using CHAT GPT now. Just canât figure out one issue currently which is adding in
the filters because the inverted comas are disrupting the flow is what I believe. Its coming up with an unexpected token error for the Source ID eq part. And not sure how to overcome it
â
Define the base URL of the API and the endpoint to be queried
The below line needs to be after, $sourceId = â2c9180867a15f0f1017a1f6580392a5fâ
baseUrl = âhttps://tenant.api.identitynow.com/v3/accounts?filters=sourceid eq $($sourceid)â
Then you don't need - $fullBaseUrl = â$baseUrl "$sourceId"â
Of course you'll need to fix the apiUrl line:
$apiUrl = â$($baseUrl)$($endpoint)?offset=$($offset)&limit=$($limit)â
Worth mentioning, even if it only helps out 1 other person, but Version: 8.5.1 of the importer-Exporter tool fixes this issue RE: paging limitation for the tool.