# Set org's roles and role groups

Update the roles and role groups of the organization for a specific application, which will replace any existing assignments. These roles and role groups must first be created for the application. Once added to the organization, roles that belong to these role groups or are directly assigned can be assigned to members of the organization to control their access to the application. **Required permissions**: `organizations:edit`, `orgs:edit`.

Endpoint: POST /v1/applications/{app_id}/organizations/{organization_id}/roles-and-groups/set
Security: AdminAccessToken

## Security:

  - `AdminAccessToken` (unknown)
    oauth2

## Path parameters:

  - `app_id` (string, required)
    ID of the application

  - `organization_id` (string, required)
    ID of the organization

## Request fields (application/json):

  - `role_group_ids` (array)
    Role group ids

  - `role_ids` (array)
    Role ids

