# API \\search not working in Production. Any other endpoints?

**URL:** <https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199>\
**Category:** SHF Discussion and Questions\
**Tags:** apis, identity-security-cloud\
**Created:** [April 16, 2025, 2:32pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199 "2025-04-16T14:32:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [April 16, 2025, 2:32pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/1 "2025-04-16T14:32:55Z")

</div>

Hi all,  
The client needs to know what identities have to much access. To achieve this I have written a PS script that uses the endpoint \v2024\roles to get all roles and their accessProfiles, and the \search endpoint to get all identities with their roles and accessProfiles.  
I then create two arrays of expected access and assigned access, then comparing the difference to provide two deltas.

This is working perfectly in sandbox and takes around a minute to run.

This is NOT working at all in Production due to an error with the \search endpoint. This has been raised with Sailpoint and is currently sitting with the engineers to fix.

So, the longwinded ask, is, does anyone know how to get easily get each identities’ roles and accessProfiles without using the search endpoint? The client is looking for an answer as I said that I could deliver this quickly.  
Thanks

---

<div class="post-metadata">

**Author:** ![amankumargupta](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/amankumargupta/32/29688_2.png) [@amankumargupta](https://developer.sailpoint.com/discuss/u/amankumargupta)\
**Post date:** [April 16, 2025, 3:38pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/2 "2025-04-16T15:38:09Z")

</div>

Hi @PhilRawlings1 you can use this api [list-historical-identities | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/beta/list-historical-identities)  
to list all the identities and store it in an array and then you can use this api [list-identity-access-items | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/beta/list-identity-access-items) to get list of each identities access items

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [April 16, 2025, 3:52pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/3 "2025-04-16T15:52:41Z")

</div>

HIi @amankumargupta ,

I looked at that endpoint, and I can get either roles, or accessProfiles, but not in the same call. ?type=roles&type=accessProfiles doesn’t work.

Also, I can only get the details of one identity per api call, so that works out at 7000+ api calls

Something to think about  
Thanks

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [April 16, 2025, 4:06pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/4 "2025-04-16T16:06:58Z")

</div>

Hi Phil,

Can you check on this API and see if it works on your scenario?

> **[get-role-assignments | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/v2024/get-role-assignments)**
>
> \<Heading

Thanks.

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [April 16, 2025, 5:06pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/5 "2025-04-16T17:06:39Z")

</div>

Hi @kdfreeman,

That API brings back the roles on the identity, but not the accessProfiles.

But thank you for the suggestion

---

<div class="post-metadata">

**Author:** ![David\_Norris](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@David\_Norris](https://developer.sailpoint.com/discuss/u/David_Norris)\
**Post date:** [April 16, 2025, 5:41pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/6 "2025-04-16T17:41:13Z")

</div>

> [@PhilRawlings1](#):
>
> NOT working at all in Production due to an error

…and this error is in all versions of the search endpoint? And I’m guessing you can’t even interactively download an identity report to “Include Access Details”? i.e. Data availability / accessibility is severely / negatively impacted. #SomeoneElsesComputer

From a service availability perspective:  
If it’s a production issue…it’s P1, getting that fixed by SailPoint would likely be the quickest…unless there’s some other reason/need that says P1 resolution isn’t even fast enough.

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [April 16, 2025, 6:13pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/7 "2025-04-16T18:13:22Z")

</div>

The data in production isn’t ‘correlated’ properly. Probably not the correct word, but basically each identity seems to have every entitlement associated with it when you search for it using \search. The amount of data being brought back is huge and crashing the API call.  
I’ve tried pagination, which works for a few iterations, but then the “sort = {field = “id”; order = “asc” }” function fails and the returned data is repeated

Its not really a P1 problem, but we are pushing Sailpoint to resolve it.

My current idea is to use \search to just bring back all identity.ID which takes around 10s and just survives, then loop through each one, again using \search to pull back the access.type & access.Name attributes. It’s still +3500 API calls which is not a great idea and going to take a lot processing. Not sure if Powershell is up to the task

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [April 16, 2025, 6:16pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/8 "2025-04-16T18:16:56Z")

</div>

I was implementing search, storing thousands of identity data in list and looping that list to process each identity. There was no issue for me and it was not taking that much time. Can you try with python scripting?

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [April 16, 2025, 6:25pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/9 "2025-04-16T18:25:00Z")

</div>

If I can’t get it to work with PS, I’ll give python a go over the weekend.

NB. Will probably have to get my son to help me with that as my python is so rusty its going to take more than a can of WD40 to get it working again.

Thanks for the idea

Edit:  
This is my queryFilter:

```auto
    "queryResultFilter": {
        "includes": [
            "id",
            "displayName",
            "access.name",
            "access.type"
        ]
    }

```

if anyone knows how to exclude access.type:entitlement that would might solve the problem, as its the stupid number of entitlements being returned that is the problem

---

<div class="post-metadata">

**Author:** ![David\_Norris](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@David\_Norris](https://developer.sailpoint.com/discuss/u/David_Norris)\
**Post date:** [April 16, 2025, 7:19pm UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/10 "2025-04-16T19:19:50Z")

</div>

(Regarding Python or PS) It’s not a matter of the programming language (in this case)…it’s the API, regardless of the language you decide to use to interact with the APIs.

---

<div class="post-metadata">

**Author:** ![PhilRawlings1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/philrawlings1/32/37266_2.png) [@PhilRawlings1](https://developer.sailpoint.com/discuss/u/PhilRawlings1)\
**Post date:** [April 22, 2025, 7:59am UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/11 "2025-04-22T07:59:24Z")

</div>

I mostly fixed the pagination problem, and get at 98% accuracy return. Just going to wait for Sailpoint to come back to me

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [June 21, 2025, 8:00am UTC](https://developer.sailpoint.com/discuss/t/api-search-not-working-in-production-any-other-endpoints/112199/12 "2025-06-21T08:00:09Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
