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

# Assign Organization IDP Group

## Permissions

Requires a service user with the `ManageAccountMembership` permission at the enterprise level.


## OpenAPI

````yaml /v3-openapi.yaml POST /v3/enterprise/organizations/{org_id}/members/idp-groups/{idp_group_name}
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/organizations/{org_id}/members/idp-groups/{idp_group_name}:
    post:
      tags:
        - idp_groups
      summary: Assign Organization IDP Group
      operationId: >-
        handle_assign_organization_idp_group_role_v3_enterprise_organizations__org_id__members_idp_groups__idp_group_name__post
      parameters:
        - description: 'Organization ID (prefix: org-)'
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
        - in: path
          name: idp_group_name
          required: true
          schema:
            title: Idp Group Name
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdpGroupUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    IdpGroupUpdateRoleRequest:
      properties:
        role_id:
          title: Role Id
          type: string
      required:
        - role_id
      title: IdpGroupUpdateRoleRequest
      type: object
    IdpGroup:
      properties:
        idp_group_name:
          title: Idp Group Name
          type: string
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
      required:
        - idp_group_name
        - role_assignments
      title: IdpGroup
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    RoleAssignment:
      properties:
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        role:
          $ref: '#/components/schemas/Role'
      required:
        - role
      title: RoleAssignment
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    Role:
      properties:
        role_id:
          title: Role Id
          type: string
        role_name:
          title: Role Name
          type: string
        role_type:
          enum:
            - enterprise
            - org
          title: Role Type
          type: string
      required:
        - role_name
        - role_id
        - role_type
      title: Role
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````