Remove a role from a user in an organization

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Logto API references MCP server": {
  "url": "https://openapi.logto.io/mcp"
}
Close
DELETE /api/organizations/{id}/users/{userId}/roles/{organizationRoleId}

Remove a role assignment from a user in the specified organization.

Path parameters

  • id string Required

    The unique identifier of the organization.

  • userId string Required

    The unique identifier of the user.

  • organizationRoleId string Required

    The unique identifier of the organization role.

Responses

  • 204

    The role was removed from the user successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Cannot find the record to delete.

  • 422

    The user is not a member of the organization.

DELETE /api/organizations/{id}/users/{userId}/roles/{organizationRoleId}
curl \
 --request DELETE 'https://[tenant_id].logto.app/api/organizations/{id}/users/{userId}/roles/{organizationRoleId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"