{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github-enterprise/json-schema/github-enterprise-scim-user-schema.json",
  "title": "SCIM /Users",
  "description": "SCIM /Users provisioning endpoints",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-enterprise-scim-api-openapi.yml#/components/schemas/scim-user",
  "type": "object",
  "properties": {
    "schemas": {
      "description": "SCIM schema used.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "id": {
      "description": "Unique identifier of an external identity",
      "type": "string"
    },
    "externalId": {
      "description": "The ID of the User.",
      "type": [
        "string",
        "null"
      ]
    },
    "userName": {
      "description": "Configured by the admin. Could be an email, login, or username",
      "type": [
        "string",
        "null"
      ]
    },
    "profileUrl": {
      "description": "The URL of the linked GitHub user's profile.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "displayName": {
      "description": "The name of the user, suitable for display to end-users",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": "object",
      "properties": {
        "givenName": {
          "type": [
            "string",
            "null"
          ]
        },
        "familyName": {
          "type": [
            "string",
            "null"
          ]
        },
        "formatted": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "emails": {
      "description": "user emails",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "value"
        ]
      }
    },
    "active": {
      "description": "The active status of the User.",
      "type": "boolean"
    },
    "meta": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "lastModified": {
          "type": "string",
          "format": "date-time"
        },
        "location": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "organization_id": {
      "description": "The ID of the organization.",
      "type": "integer"
    },
    "operations": {
      "description": "Set of operations to be performed",
      "type": "array",
      "minItems": 1,
      "items": {
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add",
              "remove",
              "replace"
            ]
          },
          "path": {
            "type": "string"
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object"
              },
              {
                "type": "array",
                "items": {}
              }
            ]
          }
        },
        "required": [
          "op"
        ],
        "type": "object"
      }
    },
    "groups": {
      "description": "associated groups",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "display": {
            "type": "string"
          }
        }
      }
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "display": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "id",
    "schemas",
    "emails",
    "active",
    "meta"
  ]
}