---
title: Get a SCIM group by ID
slug: opti-id/api/get-a-scim-group-by-id
docTags: 
createdAt: 2026-10-01T19:58:50.958Z
---

{
  "id": "rHLZ_N05kx0SPP0TM_IHB",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://identity-api.optimizely.com/api/scim/v2/groups/{id}",
    "servers": [
      {
        "url": "https://identity-api.optimizely.com/api/scim/v2/groups/{id}"
      }
    ],
    "name": "Get a SCIM group by ID",
    "description": "SCIM endpoint for fetching a group by its ID.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "description": "ID of the group to fetch."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiToken_auth",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The fetched group.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "core2Group",
            "schema": [
              {
                "name": "customExtension",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "customType": "map<string, iDictionary_object>",
                "schema": []
              },
              {
                "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": "displayName",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "members",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/member",
                "customType": "member[]",
                "schema": [
                  {
                    "name": "display",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "value",
                    "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": ""
              }
            ],
            "modelRef": "#/components/schemas/core2Group",
            "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": "404",
        "description": "The requested resource was not found.",
        "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": "500",
        "description": "<p>A server error occurred, please try again</p>",
        "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
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "mEgSdoOMkTGqwwF5G8THo",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://identity-api.optimizely.com/api/scim/v2/groups/{id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "HfXdhhFoqOoxryFuuXpvt",
          "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/groups/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lsO4NK9UWZTpIoFg_FfZA",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://identity-api.optimizely.com/api/scim/v2/groups/{id}\")\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": "1Dw4_lejfY6oZ0Tya7kJu",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://identity-api.optimizely.com/api/scim/v2/groups/{id}\"\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": "mEgSdoOMkTGqwwF5G8THo"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The fetched group.\n{\n  \"customExtension\": \"\",\n  \"meta\": {\n    \"resourceType\": \"\",\n    \"created\": \"\",\n    \"lastModified\": \"\",\n    \"version\": \"\",\n    \"location\": \"\"\n  },\n  \"displayName\": \"\",\n  \"members\": [\n    {\n      \"display\": \"\",\n      \"type\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"externalId\": \"\",\n  \"id\": \"\",\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-404",
          "language": "404",
          "code": "// The requested resource was not found.\n{\n  \"scimType\": \"\",\n  \"detail\": \"\",\n  \"status\": \"\",\n  \"schemas\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// A server error occurred, please try again\n{\n  \"scimType\": \"\",\n  \"detail\": \"\",\n  \"status\": \"\",\n  \"schemas\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}