Find identity and all Access Profiles assigned to it

I’m looking for a way to find and Identity and all of the Access Profiles attached to it.

Generating the report on sorting out the access works but wanted to see if anyone knew of a better way to do this.

There is a v3 API:

{{api-url}}/beta/search/identities?count=true&offset=0&limit=20

The query is specified in the body:

{
    "queryType": "SAILPOINT",
    "query": {
      "query": "attributes.uid:ABC123"
    }
}

The data you are looking for will be under the access key with type = ACCESS_PROFILE