> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Effective Permissions

> Returns all permissions that apply to a user — from direct assignment, role membership, and group-to-role inheritance — with source attribution.



## OpenAPI

````yaml /en/openapi/v3-current/AM-identity.yaml get /v1/users/{id}/effective-permissions
openapi: 3.0.1
info:
  contact: {}
  description: This is a swagger documentation for the Identity API
  termsOfService: http://swagger.io/terms/
  title: Identity API
  version: 1.0.0
servers:
  - url: //localhost:4001/
security: []
paths:
  /v1/users/{id}/effective-permissions:
    get:
      tags:
        - Users
      summary: Get Effective Permissions
      description: >-
        Returns all permissions that apply to a user — from direct assignment,
        role membership, and group-to-role inheritance — with source
        attribution.
      parameters:
        - description: User ID
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EffectivePermissionResponse'
                type: array
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    EffectivePermissionResponse:
      description: >-
        EffectivePermissionResponse includes a permission and all sources
        granting it.
      example:
        sources:
          - groupName: Engineering
            roleId: midaz-editor
            groupId: engineering
            roleName: Midaz Editor
            type: role
          - groupName: Engineering
            roleId: midaz-editor
            groupId: engineering
            roleName: Midaz Editor
            type: role
        effect: allow
        isEnabled: true
        name: Midaz Editor Permission
        resources:
          - resources
          - resources
        id: midaz-editor-permission
        actions:
          - actions
          - actions
      properties:
        actions:
          description: Allowed actions.
          items:
            type: string
          type: array
        effect:
          description: 'Effect: "allow" or "deny".'
          example: allow
          type: string
        id:
          description: Permission identifier.
          example: midaz-editor-permission
          type: string
        isEnabled:
          description: Whether the permission is enabled.
          example: true
          type: boolean
        name:
          description: Permission display name.
          example: Midaz Editor Permission
          type: string
        resources:
          description: Resources this permission covers.
          items:
            type: string
          type: array
        sources:
          description: All sources that grant this permission to the user.
          items:
            $ref: '#/components/schemas/PermissionSource'
          type: array
      type: object
    pkg.HTTPError:
      properties:
        code:
          type: string
        entityType:
          type: string
        err:
          type: object
        message:
          type: string
        title:
          type: string
      type: object
    PermissionSource:
      description: PermissionSource describes how a permission reached the user.
      example:
        groupName: Engineering
        roleId: midaz-editor
        groupId: engineering
        roleName: Midaz Editor
        type: role
      properties:
        groupId:
          description: Group identifier (populated when Type is "group_role").
          example: engineering
          type: string
        groupName:
          description: Group display name.
          example: Engineering
          type: string
        roleId:
          description: Role identifier (populated when Type is "role" or "group_role").
          example: midaz-editor
          type: string
        roleName:
          description: Role display name.
          example: Midaz Editor
          type: string
        type:
          description: 'Source type: "direct", "role", or "group_role".'
          example: role
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      description: 'Bearer authentication. Send Authorization: Bearer <token>.'
      in: header
      name: Authorization
      type: apiKey

````