List an Identity's Roles

get

/access-governance/identities/20250331/identities/{identityId}/roles

Returns a list of Roles for the given Identity. Note keyword searches are limited to the name field and the first keyword query param.

Request

Path Parameters
Query Parameters
  • Collection Format: multi
    Maximum Number of Items: 5
    The list of keywords to filter on
  • Minimum Value: 1
    Maximum Value: 100
    The maximum number of items to return.
    Default Value: 10
  • Minimum Length: 1
    A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.
  • The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.
    Default Value: timeCreated
    Allowed Values: [ "timeCreated", "displayName" ]
  • The sort order to use, either 'ASC' or 'DESC'.
    Allowed Values: [ "ASC", "DESC" ]
Header Parameters
  • The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.
Back to Top

Response

Supported Media Types

200 Response

A list of Role objects.
Headers
  • For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items.
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : AccessGovernanceTypeCollection
Type: object
A list of Access Governance Entity items.
Show Source
Nested Schema : items
Type: array
List of Access Governance Entity items.
Show Source
Nested Schema : AccessGovernanceEntity
Type: object
An Access Governance Entity
Show Source
Nested Schema : ViolationDetails
Type: object
The Violation details object
Show Source

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

429 Response

Too Many Requests
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

Default Response

Unknown Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Back to Top

Examples

The following example shows how to retrieve roles assigned to an identity.

cURL Example - Without Query Parameters

curl -i -X GET \
 -H "Authorization:Bearer <your access token >" \
 '${service-instance-url}/access-governance/identities/${versionId}/identities/${identityId}/roles

Example of the Response Body

The following example shows the contents of the response body in JSON format, including details for an identity:

{
  "items": [
    {
      "id": "032e5b98-f13e-4516-bf5b-350064bbxxx",
      "type": "ROLE",
      "name": "InsightTestRole",
      "timeCreated": "2025-03-20T07:50:00.000Z",
      "timeUpdated": "2025-03-20T07:50:00.000Z",
      "entityType": "PM_ROLE",
      "typeDetails": "{$si}/access-governance/identities/20250331/types/agcs.Role",
      "attributes": [
        {
          "name": "provisionedByMechanism",
          "value": "REQUEST"
        },
        {
          "name": "status",
          "value": "REVOKED"
        },
        {
          "name": "accountId",
          "value": "targetId.account.ICF.xxxxxxx-4b4c-8f48-629eb3daxxx9.c8b30e19f5ff86b4bb5d99a3e195ec32"
        },
        {
          "name": "risk",
          "value": ""
        }
      ],
      "value": "{\"appIdDisplayName\":\"\",\"approvalWorkflowId\":\"NO_APPROVAL_REQUIRED\",\"createdByRef\":{\"value\":\"globalId.xxxxx.\",\"displayName\":\"Jordan Rivers\",\"customAttributes\":{}},\"classifications\":\"\",\"customAttributes\":{},\"description\":\"desc InsightRole\",\"isCertifiable\":false,\"name\":\"InsightTestRole\",\"provisionedByMechanism\":\"REQUEST\",\"requestableBy\":\"ANY\",\"riskLevel\":\"0\",\"status\":\"REVOKED\",\"tags\":[],\"grantDate\":\"1742490881922\",\"grantUntil\":\"\",\"accountId\":\"targetId.account.ICF.629eb3daxxx9.xxxxxc32\",\"policyId\":\"71ce21e8-xxxxx-3162a8f1xxx8\",\"risk\":\"\",\"owner\":{\"value\":\"globalId.xxxx-ab68-xxxx-ae89-7bcc0f9dxxxbe.18.a84836862e0958ba29exxxx\",\"displayName\":\"Jordan Rivers\",\"customAttributes\":{}},\"id\":\"032e5b98-f13e-4516-bf5b-350064bbxxx\",\"meta\":{\"resourceType\":\"PM_ROLE\",\"created\":1742457000000,\"lastModified\":1742457000000}}"
    }
  ]
}
Back to Top