Thank you all for the suggestions, really appreciated.
I tested innerHit, and it does help filter the access results by source/type. However, in my use case I also need the identity details in the same response.
With innerHit, I can see the filtered access entries, but I’m not seeing a clear link back to the identity details that would let me reliably join both datasets.
So what I’m really looking for is a way to:
return identities matching my search criteria
return only the matching access entries for those identities
Ah I see. Unfortunately, I don’t think that’s possible with search.
I think the best go forward way for you would to parse it out using some code in a script. Here’s a quick powershell script of the logic that I think would work with your original query to filter out the results for the specific source you want:
The short answer is no, it will throw you the entire access object for each hit. You will need to filter it on whatever mechanism you are using to call the API.