---
title: "List role assignments for principal"
url: "https://nov18-dev.movespot.fyi/apis/internal-pdp-policy-access-point-api-v1-1/versions/38c51035-26bf-4e85-b665-4a699daed68a/operations/listPrincipalRoleAssignments"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/internal-pdp-policy-access-point-api-v1-1/versions/38c51035-26bf-4e85-b665-4a699daed68a.md

# List role assignments for principal

`GET` `/{principalType}/{principalId}/role-assignments`

Operation ID: `listPrincipalRoleAssignments`

Returns a paginated list of role assignments for the specified principal with optional filtering

## Path parameters

- `principalType` (string, required) - Type of principal
- `principalId` (string, uuid, required) - Unique identifier of the principal

## Query parameters

- `filter[entity_type_name]` (optional) - Filter by entity type name
- `filter[role_name]` (optional) - Filter by role name
- `filter[entity_id]` (optional) - Filter by entity ID

## Responses

- `200` - Successful response

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Internal PDP Policy Access Point API v1
  version: 1.0.2
servers:
  - url: http://authorization-pap-api.kauth.svc.cluster.local:8000/v1
    description: Konnect cluster
paths:
  /{principalType}/{principalId}/role-assignments:
    parameters:
      - name: principalType
        in: path
        description: Type of principal
        required: true
        schema:
          $ref: "#/components/schemas/RoleAssignmentPrincipalType"
      - name: principalId
        in: path
        description: Unique identifier of the principal
        required: true
        schema:
          $ref: "#/components/schemas/PrincipalId"
    get:
      operationId: listPrincipalRoleAssignments
      summary: List role assignments for principal
      description: Returns a paginated list of role assignments for the specified
        principal with optional filtering
      parameters:
        - name: filter[entity_type_name]
          in: query
          description: Filter by entity type name
          schema:
            $ref: "#/components/schemas/StringFieldFilter"
        - name: filter[role_name]
          in: query
          description: Filter by role name
          schema:
            $ref: "#/components/schemas/StringFieldFilter"
        - name: filter[entity_id]
          in: query
          description: Filter by entity ID
          schema:
            $ref: "#/components/schemas/StringFieldFilter"
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PagedRoleAssignmentResponse"
      tags:
        - Role Assignments
security:
  - konnectAccessToken: []
components:
  schemas:
    RoleAssignmentPrincipalType:
      description: Principal types that support role assignments
      type: string
      enum:
        - users
        - system-accounts
        - teams
        - portal-teams
    PrincipalId:
      description: Contains a unique identifier used for a principal (user, system
        account, portal developer, etc.)
      type: string
      format: uuid
      example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
    StringFieldFilter:
      description: Filters on the given string field value by either exact or fuzzy match.
      oneOf:
        - $ref: "#/components/schemas/StringFieldEqualsFilter"
        - $ref: "#/components/schemas/StringFieldContainsFilter"
        - $ref: "#/components/schemas/StringFieldOContainsFilter"
        - $ref: "#/components/schemas/StringFieldOEQFilter"
        - $ref: "#/components/schemas/StringFieldNEQFilter"
      title: StringFieldFilter
      x-examples:
        example-1: equals-some-value
        example-2:
          eq: some-value
        example-3:
          contains: some-value
        example-4:
          ocontains: some-potential,value
        example-5:
          oeq: some-potential,value
        example-6:
          neq: not-this-value
    PagedRoleAssignmentResponse:
      type: object
      properties:
        meta:
          $ref: "#/components/schemas/PaginatedMeta"
        data:
          type: array
          items:
            $ref: "#/components/schemas/RoleAssignment"
      required:
        - meta
        - data
    StringFieldEqualsFilter:
      description: Filters on the given string field value by exact match.
      oneOf:
        - type: string
        - type: object
          title: StringFieldEqualsComparison
          additionalProperties: false
          properties:
            eq:
              type: string
          required:
            - eq
      title: StringFieldEqualsFilter
      x-examples:
        example-1: equals-some-value
        example-2:
          eq: some-value
    StringFieldContainsFilter:
      description: Filters on the given string field value by fuzzy match.
      type: object
      properties:
        contains:
          type: string
      additionalProperties: false
      required:
        - contains
      title: StringFieldContainsFilter
      x-examples:
        example-1:
          contains: some-value
    StringFieldOContainsFilter:
      description: Returns entities that fuzzy-match any of the comma-delimited
        phrases in the filter string.
      type: object
      properties:
        ocontains:
          type: string
      additionalProperties: false
      required:
        - ocontains
      title: StringFieldOContainsFilter
      x-examples:
        example-1:
          ocontains: this-value,or-that-value
    StringFieldOEQFilter:
      description: Returns entities that exact match any of the comma-delimited
        phrases in the filter string.
      type: object
      properties:
        oeq:
          type: string
      additionalProperties: false
      required:
        - oeq
      title: StringFieldOEQFilter
      x-examples:
        example-1:
          oeq: some-value,some-other-value
    StringFieldNEQFilter:
      description: Filters on the given string field value by exact match inequality.
      type: object
      properties:
        neq:
          type: string
      additionalProperties: false
      required:
        - neq
      title: StringFieldNEQFilter
      x-examples:
        example-1:
          neq: not-this-value
    PaginatedMeta:
      description: returns the pagination information
      type: object
      properties:
        page:
          $ref: "#/components/schemas/PageMeta"
      required:
        - page
      title: PaginatedMeta
    RoleAssignment:
      description: A role assignment for a subject (user/system account)
      type: object
      properties:
        id:
          description: Unique identifier of the role assignment
          type: string
          format: uuid
        role_krn:
          description: Kong Resource Name of the role
          type: string
        role_name:
          description: Display name of the assigned role
          type: string
        region:
          description: Region where the role applies
          type: string
        resource:
          description: Resource identifier
          type: string
        entity_type_name:
          description: Entity type name associated with the role
          type: string
      required:
        - id
        - role_krn
        - region
        - resource
        - entity_type_name
        - role_name
    PageMeta:
      description: Contains pagination query parameters and the total number of
        objects returned.
      type: object
      properties:
        number:
          type: number
          example: 1
        size:
          type: number
          example: 10
        total:
          type: number
          example: 100
      required:
        - number
        - size
        - total
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
```
