Replace resource scopes for organization role

PUT /api/organization-roles/{id}/resource-scopes

Replace all resource scopes that are assigned to the specified organization role with the given resource scopes. This effectively removes all existing organization scope assignments and replaces them with the new ones.

Path parameters

  • id string Required

    The unique identifier of the organization role.

application/json

Body Required

  • scopeIds array[string] Required

    An array of resource scope IDs to replace existing scopes.

    Minimum length of each is 1.

Responses

  • Resource scopes were replaced successfully.

  • Bad Request

  • Unauthorized

  • Forbidden

  • At least one of the IDs provided is invalid. For example, the resource scope ID does not exist.

PUT /api/organization-roles/{id}/resource-scopes
curl \
 -X PUT https://[tenant_id].logto.app/api/organization-roles/{id}/resource-scopes \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"scopeIds":["string"]}'
Request examples
{
  "scopeIds": [
    "string"
  ]
}