Query Role - Criteria

Hello,

We need urgent support. I would like to know if there is any query or API that I can use to extract the roles that do not have these 3 criteria? The intention is that if these criteria are not present, I will have to add them.

1 - Type: Identity Attibute - Name: LifeCycle State - Operation: Does Not Equal - Value: inactive

2 - Type: Identity Attibute - Name: LifeCycle State - Operation: Does Not Equal - Value: posinactive

3 - Type: Identity Attibute - Source: OUD - Attribute: dn - Operation: Contains - Value: =

Workflow calls GET /v3/roles

1 Like

u can use workflow i think

1 Like

But how could I filter the roles that don’t have this criteria please?

Hi @kaiolima

When using the Roles API directly, you can’t filter based on membership criteria. Similarly, the Search API with index type roles does not return membershipCriteria information.

You have the following options:

  1. Use a script to retrieve the full list of roles, iterate through them, and check whether they contain the three specific criteria. If not, you can isolate those roles, reverify them, and then update them using the API.
  2. Use the VSCode plugin to export the list of roles and work with the CSV file to identify which roles are missing the three membershipCriteria. You can then update them either via script or manually. Note that the VSCode plugin does not support re-importing roles for updates.

Thanks @baoussounda !!!

1 Like

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