How do I generate a report for all active users of a particular application along with their corresponding entitlements using a search query?

I have written a search query for a single application to get all active users and their corresponding entitlements:

@accounts(source.name:“ABC Application”) AND attributes.cloudLifecycleState:active

This query returns all active users for the ABC Application, but when I download the report, I see entitlements from other applications as well.

How can I restrict the results to show only the entitlements related to the ABC Application?

use query like this @access(source.name.exact:ABC Application)

1 Like

Hi @Ankitha12 ,
Welcome to the Sailpoint Developer Community
Try source id instead of name and see if that works
@accounts(source.id:“**********************”) AND attributes.cloudLifecycleState:active

Hi @Ankitha12

Here is the workaround: (in my solution I use Active Directory source)

attributes.cloudLifecycleState:active

When you click Get report, you need to select Include Access details

finally, you need to filter on the downloaded report:

Access Type : ENTITLEMENT and Access Source Name: ACTIVE DIRECTORY

1 Like

You cannot do this with single search query. You will need a script to filter out unwanted entitlements from the result

1 Like

Hello @Ankitha12

Welcome to the community!

This cannot be extracted from a single search query as there is no way in search to apply filters currently. There are two ways currently to suffice this -

  1. Run your query in Search and Include Access Details while downloading the report. Filter this data for Access Source Name for the required application.
  2. Go to Connections → Sources → Open Source → Go to Accounts Page → Click on Export. Filter the data as required.
1 Like

Thanks for the help @HussainshaSyed001, but this query also does not to show only the entitlements related to the ABC Application

Thanks for the suggestion @pattabhi, but client does not want to add filters in the excel(reports)

Thanks for the suggestion @nithyamn13, but the query which you have shared also give the same result

Thanks for the help @jainanimesh, but client does not want to add filters in the excel(reports)

Hi @Ankitha12 , the only way to export such customized report is via writing a Script.
Use search API in Python/Powershell OR whichever Programming language you are comfortable with.

Iterate through the response and write logic in the code to append only those rows which has entitlement source name listed as “Application ABC”.

You could schedule this code to run on client’s server and send the report to any client side email address using client’s smtp server.

Seems too much effort when we can just filter the exported data from Search Export.