Search assigned role(s) and access profiles(s) for an identity that begins with "abc" displayName

Hi,

I would like to perform a search on identities, and fetch the assigned access (roles and access profiles) that have displayName beginning witth “ABC”
Here is the body that I tried:

{
    "queryType": "SAILPOINT",
    "indices":[
        "identities"
    ],
    "query": {
    "query" : "attributes.id:12345 AND @access(displayName:\"Test*")"
    },
    "queryResultFilter": {
      "includes": ["*"]
  }
}

I see all roles profiles assigned to the user. What am I missing ?
Thanks !

Hi @sanasalim,

Try doing an innerhit and see if you see the expected results:

{
    "queryType": "SAILPOINT",
    "indices":[
        "identities"
    ],
    "query": {
    "query" : "attributes.uid:12345",
    "innerHit": {
            "type": "access",
            "query": "(type:ROLE OR type:ACCESS_PROFILE) AND displayName:ABC*"
        }
    },
    "queryResultFilter": {
      "includes": ["*"]
  }
}
2 Likes

Hi @jesvin90, thank you for the response.
This works if two or more displayName’s have no common words.
If two displayNames contain a common word (ABC test Application, Water Application test), I see both in the response list. Is there a way to do an exact match ?
Thank you !

I found the solution, the search string should be like:

{
    "queryType": "SAILPOINT",
    "indices":[
        "identities"
    ],
    "query": {
    "query" : "attributes.uid:12345",
    "innerHit": {
            "type": "access",
            "query": "(type:ROLE OR type:ACCESS_PROFILE) AND displayName:\"ABC*\""
        }
    },
    "queryResultFilter": {
      "includes": ["*"]
  }
}
1 Like

Thank you so much once again @jesvin90 !

1 Like

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