---
descriptions:
  role_assignment:
    self: >-
      The Role Assignment object represents a binding between an organization
      membership and a role on a specific resource.
    object: Distinguishes the Role Assignment object.
    id: Unique identifier of the role assignment.
    role: The role that was assigned.
    role_slug: The slug of the assigned role.
    resource: The resource the role is assigned on.
    resource_id: The ID of the resource.
    resource_external_id: The external ID of the resource.
    resource_type_slug: The slug of the resource type.
    created_at: The timestamp when the role assignment was created.
    updated_at: The timestamp when the role assignment was last updated.
reference:
  curl:
    - url: /reference/fga/role-assignment
      key: role_assignment
      id: role_assignment
      title: Role Assignment
      properties:
        - key: object
          type: '"role_assignment"'
          description: (role_assignment.object)
        - key: id
          type: string
          description: (role_assignment.id)
        - key: role
          type: object
          description: (role_assignment.role)
          properties:
            - key: slug
              type: string
              description: (role_assignment.role_slug)
        - key: resource
          type: object
          description: (role_assignment.resource)
          properties:
            - key: id
              type: string
              description: (role_assignment.resource_id)
            - key: external_id
              type: string
              description: (role_assignment.resource_external_id)
            - key: resource_type_slug
              type: string
              description: (role_assignment.resource_type_slug)
        - key: created_at
          type: string
          description: (role_assignment.created_at)
        - key: updated_at
          type: string
          description: (role_assignment.updated_at)
  js:
    - url: /reference/fga/role-assignment
      key: RoleAssignment
      id: role_assignment
      title: RoleAssignment
      properties:
        - key: object
          type: '"role_assignment"'
          description: (role_assignment.object)
        - key: id
          type: string
          description: (role_assignment.id)
        - key: role
          type: object
          description: (role_assignment.role)
          properties:
            - key: slug
              type: string
              description: (role_assignment.role_slug)
        - key: resource
          type: object
          description: (role_assignment.resource)
          properties:
            - key: id
              type: string
              description: (role_assignment.resource_id)
            - key: externalId
              type: string
              description: (role_assignment.resource_external_id)
            - key: resourceTypeSlug
              type: string
              description: (role_assignment.resource_type_slug)
        - key: createdAt
          type: string
          description: (role_assignment.created_at)
        - key: updatedAt
          type: string
          description: (role_assignment.updated_at)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/fga/role-assignment/index.mdx
---

# Role Assignment

A role assignment connects an organization membership to a role on a specific resource. When a role is assigned, the user gains all permissions included in that role on the resource and its descendants through permission inheritance.

<CodeBlock
  title="Role Assignment"
  file="role-assignment"
  referenceId="role_assignment"
/>
