{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ad/json-schema/azure-ad-microsoft-graph-directory-definition-schema.json",
  "title": "microsoft.graph.directoryDefinition",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ad-applications-synchronization-api-openapi.yml#/components/schemas/microsoft.graph.directoryDefinition",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "directoryDefinition",
      "type": "object",
      "properties": {
        "discoverabilities": {
          "$ref": "#/$defs/microsoft.graph.directoryDefinitionDiscoverabilities"
        },
        "discoveryDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": [
            "string",
            "null"
          ],
          "description": "Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.",
          "format": "date-time"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the directory. Must be unique within the synchronization schema. Not nullable."
        },
        "objects": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.objectDefinition"
          },
          "description": "Collection of objects supported by the directory."
        },
        "readOnly": {
          "type": "boolean",
          "description": "Whether this object is read-only."
        },
        "version": {
          "type": [
            "string",
            "null"
          ],
          "description": "Read only value that indicates version discovered. null if discovery hasn't yet occurred."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    }
  ],
  "$defs": {
    "microsoft.graph.attributeDefinition": {
      "title": "attributeDefinition",
      "type": "object",
      "properties": {
        "anchor": {
          "type": "boolean",
          "description": "true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object's attributes must be designated as the anchor to support synchronization."
        },
        "apiExpressions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.stringKeyStringValuePair"
          }
        },
        "caseExact": {
          "type": "boolean",
          "description": "true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute."
        },
        "defaultValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "The default value of the attribute."
        },
        "flowNullValues": {
          "type": "boolean",
          "description": "'true' to allow null values for attributes."
        },
        "metadata": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.attributeDefinitionMetadataEntry"
          },
          "description": "Metadata for the given object."
        },
        "multivalued": {
          "type": "boolean",
          "description": "true if an attribute can have multiple values. Default is false."
        },
        "mutability": {
          "$ref": "#/$defs/microsoft.graph.mutability"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the attribute. Must be unique within the object definition. Not nullable."
        },
        "referencedObjects": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.referencedObject"
          },
          "description": "For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object)."
        },
        "required": {
          "type": "boolean",
          "description": "true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error."
        },
        "type": {
          "$ref": "#/$defs/microsoft.graph.attributeType"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.attributeDefinitionMetadata": {
      "title": "attributeDefinitionMetadata",
      "enum": [
        "BaseAttributeName",
        "ComplexObjectDefinition",
        "IsContainer",
        "IsCustomerDefined",
        "IsDomainQualified",
        "LinkPropertyNames",
        "LinkTypeName",
        "MaximumLength",
        "ReferencedProperty"
      ],
      "type": "string"
    },
    "microsoft.graph.attributeDefinitionMetadataEntry": {
      "title": "attributeDefinitionMetadataEntry",
      "type": "object",
      "properties": {
        "key": {
          "$ref": "#/$defs/microsoft.graph.attributeDefinitionMetadata"
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Value of the metadata property."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.attributeType": {
      "title": "attributeType",
      "enum": [
        "String",
        "Integer",
        "Reference",
        "Binary",
        "Boolean",
        "DateTime"
      ],
      "type": "string"
    },
    "microsoft.graph.directoryDefinitionDiscoverabilities": {
      "title": "directoryDefinitionDiscoverabilities",
      "enum": [
        "None",
        "AttributeNames",
        "AttributeDataTypes",
        "AttributeReadOnly",
        "ReferenceAttributes",
        "UnknownFutureValue"
      ],
      "type": "string",
      "x-ms-enum-flags": {
        "isFlags": true
      }
    },
    "microsoft.graph.entity": {
      "title": "entity",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.mutability": {
      "title": "mutability",
      "enum": [
        "ReadWrite",
        "ReadOnly",
        "Immutable",
        "WriteOnly"
      ],
      "type": "string"
    },
    "microsoft.graph.objectDefinition": {
      "title": "objectDefinition",
      "type": "object",
      "properties": {
        "attributes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.attributeDefinition"
          },
          "description": "Defines attributes of the object."
        },
        "metadata": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.objectDefinitionMetadataEntry"
          },
          "description": "Metadata for the given object."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the object. Must be unique within a directory definition. Not nullable."
        },
        "supportedApis": {
          "type": "array",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": "The API that the provisioning service queries to retrieve data for synchronization."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.objectDefinitionMetadata": {
      "title": "objectDefinitionMetadata",
      "enum": [
        "PropertyNameAccountEnabled",
        "PropertyNameSoftDeleted",
        "IsSoftDeletionSupported",
        "IsSynchronizeAllSupported",
        "ConnectorDataStorageRequired",
        "Extensions",
        "BaseObjectName"
      ],
      "type": "string"
    },
    "microsoft.graph.objectDefinitionMetadataEntry": {
      "title": "objectDefinitionMetadataEntry",
      "type": "object",
      "properties": {
        "key": {
          "$ref": "#/$defs/microsoft.graph.objectDefinitionMetadata"
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Value of the metadata property."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.referencedObject": {
      "title": "referencedObject",
      "type": "object",
      "properties": {
        "referencedObjectName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the referenced object. Must match one of the objects in the directory definition."
        },
        "referencedProperty": {
          "type": [
            "string",
            "null"
          ],
          "description": "Currently not supported. Name of the property in the referenced object, the value for which is used as the reference."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.stringKeyStringValuePair": {
      "title": "stringKeyStringValuePair",
      "type": "object",
      "properties": {
        "key": {
          "type": [
            "string",
            "null"
          ],
          "description": "Key."
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Value."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    }
  }
}