get:
  operationId: listEntitlementsByIdentity
  tags:
    - Identities
  summary: List of entitlements by Identity.
  description: >-
    The API returns a list of all entitlements assigned to an identity, either directly or through the role or access profile.
    A token with ORG_ADMIN or API authority is required to call this API.
  parameters:
    - $ref: '../../v3/parameters/limit.yaml'
    - $ref: '../../v3/parameters/offset.yaml'
    - $ref: '../../v3/parameters/count.yaml'
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: Identity Id
      example: ef38f94347e94562b5bb8424a56397d8
  responses:
    '200':
      description: List of all Entitlements for given Identity
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '../schemas/IdentityEntitlements.yaml'
          example:
            [
            {
              "type": "ENTITLEMENT",
              "id": "2c918087682f9a86016839c050861ab1",
              "name": "CN=Information Access,OU=test,OU=test-service,DC=TestAD,DC=local"
            },
            {
              "type": "ENTITLEMENT",
              "id": "2c918087682f9a86016839c0509c1ab2",
              "name": "CN=Information Technology,OU=test,OU=test-service,DC=TestAD,DC=local"
            },
            {
              "type": "ENTITLEMENT",
              "id": "2c9180886bd256ae016bd2593fe5009e",
              "name": "CN=HelpDesk,OU=test,OU=test-service,DC=TestAD,DC=local"
            }
            ]
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'