List roles

​

Returns all roles in the authenticated admin's organisation.

Authorization: Requires admin role in the organisation.

Role Scope: Roles can be at organisation or workspace level:

  • Organisation-level: scope: "organisation" with scopeId: org_id
  • Workspace-level: scope: "workspace" with scopeId: workspace_id

Role Structure: Each role contains:

  • permissions: Array of permission strings (e.g., products:read, orders:write)

Filtering:

  • displayName eq "Purchasing Manager" - Exact match
  • scope eq "organisation" - Organisation roles only
  • scopeId eq "ws_fruits" - Roles for specific workspace

Query Parameters

  • SCIM filter expression

  • Integer numbers.

  • Integer numbers.

Responses

  • application/scim+json
  • application/scim+json
  • application/scim+json
Request Example for get/v2/scim2/Roles
curl 'https://api.consentio.co/v2/scim2/Roles?filter=scope%20eq%20%22organisation%22&startIndex=1&count=100&sortBy=displayName&sortOrder=ascending' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults": 3,
  "startIndex": 1,
  "itemsPerPage": 100,
  "Resources": [
    {
      "schemas": [
        "urn:consentio:params:scim:schemas:Role:1.0"
      ],
      "id": "role_purchasing_manager",
      "externalId": "idp-role-purchasing",
      "displayName": "Purchasing Manager",
      "description": "Manager with full purchasing access",
      "scope": "organisation",
      "scopeId": "org_abc123",
      "permissions": [
        "products:read",
        "products:write",
        "orders:read",
        "orders:write",
        "orders:approve"
      ],
      "meta": {
        "resourceType": "Role"
      }
    },
    {
      "schemas": [
        "urn:consentio:params:scim:schemas:Role:1.0"
      ],
      "id": "role_product_editor",
      "displayName": "Product Editor",
      "scope": "workspace",
      "scopeId": "ws_products",
      "permissions": [
        "products:read",
        "products:write"
      ],
      "meta": {
        "resourceType": "Role"
      }
    }
  ]
}