---
title: Query for SCIM users
slug: opti-id/api/query-for-scim-users
docTags: 
createdAt: 2026-10-01T19:58:50.958Z
---

{
  "id": "VoAj3bM2W3cuG-c1DyLgZ",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://identity-api.optimizely.com/api/scim/v2/users",
    "servers": [
      {
        "url": "https://identity-api.optimizely.com/api/scim/v2/users"
      }
    ],
    "name": "Query for SCIM users",
    "description": "SCIM endpoint for querying users.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "filter",
          "type": "string",
          "description": "<p>Filter results by filter expressions.  See RFC-7644 Section 3.4.2.2 for more information.</p>"
        },
        {
          "kind": "optional",
          "name": "attributes",
          "type": "string",
          "description": "<p>Only include attributes of resource specified in results.  See RFC-7644 Section 3.4.2.5 for more information.</p>"
        },
        {
          "kind": "optional",
          "name": "excludeAttributes",
          "type": "string",
          "description": "<p>Exclude attributes of resource in results.  See RFC-7644 Section 3.4.2.5 for more information.</p>"
        },
        {
          "kind": "optional",
          "name": "startIndex",
          "type": "string",
          "description": "<p>Start results view on specified index (1 based).  See RFC-7644 Section 3.4.2.4 for more information.</p>"
        },
        {
          "kind": "optional",
          "name": "count",
          "type": "string",
          "description": "<p>Maximum number of results to return.  See RFC-7644 Section 3.4.2.4 for more information.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiToken_auth",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Query response of users matching criteria.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "queryResponseBase_optiUser",
            "schema": [
              {
                "name": "itemsPerPage",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "resources",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/optiUser",
                "customType": "optiUser[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/optiName",
                    "customType": "optiName",
                    "schema": [
                      {
                        "name": "familyName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "givenName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "active",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "meta",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/core2Metadata",
                    "customType": "core2Metadata",
                    "schema": [
                      {
                        "name": "resourceType",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "created",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "format": "date-time"
                      },
                      {
                        "name": "lastModified",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "format": "date-time"
                      },
                      {
                        "name": "version",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "location",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "customExtension",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, iDictionary_object>",
                    "schema": []
                  },
                  {
                    "name": "userName",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "externalId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "schemas",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "startIndex",
                "kind": "optional",
                "type": "integer<int32>",
                "nullable": true,
                "description": "",
                "format": "int32"
              },
              {
                "name": "totalResults",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "schemas",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/queryResponseBase_optiUser",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request was invalid or cannot be otherwise served. An accompanying error message will explain further.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "core2Error",
            "schema": [
              {
                "name": "scimType",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "schemas",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/core2Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized access to endpoint.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "<p>A server error occurred, please try again.</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "jVuFsjrBVcuiLr-QmCexP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://identity-api.optimizely.com/api/scim/v2/users \\\n     --header 'accept: application/json'"
        },
        {
          "id": "xFp6PJfC_3csAzHnyYa53",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://identity-api.optimizely.com/api/scim/v2/users\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Ujj0PtDaIkgy6lYhL4ikp",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://identity-api.optimizely.com/api/scim/v2/users\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "UBAlgmB4m1aWI-eeZ8WXC",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://identity-api.optimizely.com/api/scim/v2/users\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "jVuFsjrBVcuiLr-QmCexP"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Query response of users matching criteria.\n{\n  \"itemsPerPage\": \"\",\n  \"resources\": [\n    {\n      \"name\": {\n        \"familyName\": \"\",\n        \"givenName\": \"\"\n      },\n      \"active\": false,\n      \"meta\": {\n        \"resourceType\": \"\",\n        \"created\": \"\",\n        \"lastModified\": \"\",\n        \"version\": \"\",\n        \"location\": \"\"\n      },\n      \"customExtension\": \"\",\n      \"userName\": \"\",\n      \"externalId\": \"\",\n      \"id\": \"\",\n      \"schemas\": [\n        \"\"\n      ]\n    }\n  ],\n  \"startIndex\": \"\",\n  \"totalResults\": \"\",\n  \"schemas\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// The request was invalid or cannot be otherwise served. An accompanying error message will explain further.\n{\n  \"scimType\": \"\",\n  \"detail\": \"\",\n  \"status\": \"\",\n  \"schemas\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized access to endpoint.\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// A server error occurred, please try again.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}