{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-graph/json-schema/microsoft-graph-microsoft-graph-external-connectors-external-connection-schema.json",
  "title": "microsoft.graph.externalConnectors.externalConnection",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-graph-connections-externalconnection-api-openapi.yml#/components/schemas/microsoft.graph.externalConnectors.externalConnection",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "externalConnection",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "activitySettings": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.externalConnectors.activitySettings"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Collects configurable settings related to activities involving connector content."
        },
        "configuration": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.externalConnectors.configuration"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Specifies additional application IDs that are allowed to manage the connection and to index content in the connection. Optional."
        },
        "connectorId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Teams app ID. Optional."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of the connection displayed in the Microsoft 365 admin center. Optional."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The display name of the connection to be displayed in the Microsoft 365 admin center. Maximum length of 128 characters. Required."
        },
        "searchSettings": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.externalConnectors.searchSettings"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "The settings configuring the search experience for content in this connection, such as the display templates for search results."
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.externalConnectors.connectionState"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Indicates the current state of the connection. The possible values are: draft, ready, obsolete, limitExceeded, unknownFutureValue.",
          "readOnly": true
        },
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.externalConnectors.externalGroup"
          },
          "x-ms-navigationProperty": true
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.externalConnectors.externalItem"
          },
          "x-ms-navigationProperty": true
        },
        "operations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.externalConnectors.connectionOperation"
          },
          "x-ms-navigationProperty": true
        },
        "schema": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.externalConnectors.schema"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "x-ms-navigationProperty": true
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.externalConnectors.externalConnection",
  "$defs": {
    "microsoft.graph.binaryOperator": {
      "title": "binaryOperator",
      "enum": [
        "or",
        "and"
      ],
      "type": "string"
    },
    "microsoft.graph.entity": {
      "title": "entity",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.accessType": {
      "title": "accessType",
      "enum": [
        "grant",
        "deny",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.acl": {
      "title": "acl",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "accessType": {
          "$ref": "#/$defs/microsoft.graph.externalConnectors.accessType"
        },
        "type": {
          "$ref": "#/$defs/microsoft.graph.externalConnectors.aclType"
        },
        "value": {
          "type": "string",
          "description": "The unique identifer of the identity. For Microsoft Entra identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. For external groups value is set to the ID of the externalGroup"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.aclType": {
      "title": "aclType",
      "enum": [
        "user",
        "group",
        "everyone",
        "everyoneExceptGuests",
        "externalGroup",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.activitySettings": {
      "title": "activitySettings",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "urlToItemResolvers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.externalConnectors.urlToItemResolverBase"
          },
          "description": "Specifies configurations to identify an externalItem based on a shared URL."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.configuration": {
      "title": "configuration",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "authorizedAppIds": {
          "type": "array",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": "A collection of application IDs for registered Microsoft Entra apps that are allowed to manage the externalConnection and to index content in the externalConnection."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.connectionOperation": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "connectionOperation",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "error": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.publicError"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "If status is failed, provides more information about the error that caused the failure."
            },
            "status": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.externalConnectors.connectionOperationStatus"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "Indicates the status of the asynchronous operation. The possible values are: unspecified, inprogress, completed, failed, unknownFutureValue."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.externalConnectors.connectionOperation"
    },
    "microsoft.graph.externalConnectors.connectionOperationStatus": {
      "title": "connectionOperationStatus",
      "enum": [
        "unspecified",
        "inprogress",
        "completed",
        "failed",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.connectionState": {
      "title": "connectionState",
      "enum": [
        "draft",
        "ready",
        "obsolete",
        "limitExceeded",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.displayTemplate": {
      "title": "displayTemplate",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The text identifier for the display template; for example, contosoTickets. Maximum 16 characters. Only alphanumeric characters allowed."
        },
        "layout": {
          "description": "The definition of the content's appearance, represented by an Adaptive Card, which is a JSON-serialized card object model."
        },
        "priority": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": "number",
          "description": "Defines the priority of a display template. A display template with priority 1 is evaluated before a template with priority 4. Gaps in priority values are supported. Must be positive value.",
          "format": "int32"
        },
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.externalConnectors.propertyRule"
          },
          "description": "Specifies additional rules for selecting this display template based on the item schema. Optional."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.externalActivity": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "externalActivity",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "startDateTime": {
              "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",
              "description": "The date and time when the particular activity occurred. The DateTimeOffset type represents date and time information 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"
            },
            "type": {
              "$ref": "#/$defs/microsoft.graph.externalConnectors.externalActivityType"
            },
            "performedBy": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.externalConnectors.identity"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "Represents an identity used to identify who is responsible for the activity.",
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ]
    },
    "microsoft.graph.externalConnectors.externalActivityType": {
      "title": "externalActivityType",
      "enum": [
        "viewed",
        "modified",
        "created",
        "commented",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.externalGroup": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "externalGroup",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "description": {
              "type": [
                "string",
                "null"
              ],
              "description": "The description of the external group. Optional."
            },
            "displayName": {
              "type": [
                "string",
                "null"
              ],
              "description": "The friendly name of the external group. Optional."
            },
            "members": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.externalConnectors.identity"
              },
              "description": "A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members.",
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.externalConnectors.externalGroup"
    },
    "microsoft.graph.externalConnectors.externalItem": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "externalItem",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "acl": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.externalConnectors.acl"
              },
              "description": "An array of access control entries. Each entry specifies the access granted to a user or group. Required."
            },
            "content": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.externalConnectors.externalItemContent"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "A plain-text  representation of the contents of the item. The text in this property is full-text indexed. Optional."
            },
            "properties": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.externalConnectors.properties"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "A property bag with the properties of the item. The properties MUST conform to the schema defined for the externalConnection. Required."
            },
            "activities": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.externalConnectors.externalActivity"
              },
              "description": "Returns a list of activities performed on the item. Write-only.",
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.externalConnectors.externalItem"
    },
    "microsoft.graph.externalConnectors.externalItemContent": {
      "title": "externalItemContent",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/microsoft.graph.externalConnectors.externalItemContentType"
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "The content for the externalItem. Required."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.externalItemContentType": {
      "title": "externalItemContentType",
      "enum": [
        "text",
        "html",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.identity": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "identity",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "type": {
              "anyOf": [
                {
                  "$ref": "#/$defs/microsoft.graph.externalConnectors.identityType"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "The type of identity. The possible values are: user or group for Microsoft Entra identities and externalgroup for groups in an external system."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.externalConnectors.identity"
    },
    "microsoft.graph.externalConnectors.identityType": {
      "title": "identityType",
      "enum": [
        "user",
        "group",
        "externalGroup",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.label": {
      "title": "label",
      "enum": [
        "title",
        "url",
        "createdBy",
        "lastModifiedBy",
        "authors",
        "createdDateTime",
        "lastModifiedDateTime",
        "fileName",
        "fileExtension",
        "unknownFutureValue",
        "iconUrl"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.properties": {
      "title": "properties",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.property": {
      "title": "property",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "aliases": {
          "type": "array",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": "A set of aliases or a friendly name for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional."
        },
        "isQueryable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Specifies if the property is queryable. Queryable properties can be used in Keyword Query Language (KQL) queries. Optional."
        },
        "isRefinable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Specifies if the property is refinable.  Refinable properties can be used to filter search results in the Search API and add a refiner control in the Microsoft Search user experience. Optional."
        },
        "isRetrievable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Specifies if the property is retrievable. Retrievable properties are returned in the result set when items are returned by the search API. Retrievable properties are also available to add to the display template used to render search results. Optional."
        },
        "isSearchable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Specifies if the property is searchable. Only properties of type String or StringCollection can be searchable. Nonsearchable properties aren't added to the search index. Optional."
        },
        "labels": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/microsoft.graph.externalConnectors.label"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "description": "Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (for example, better relevance). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl. Use the Prefer: include-unknown-enum-members request header to get the following members in this evolvable enum: iconUrl."
        },
        "name": {
          "type": "string",
          "description": "The name of the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^.  Required."
        },
        "type": {
          "$ref": "#/$defs/microsoft.graph.externalConnectors.propertyType"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.propertyRule": {
      "title": "propertyRule",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "operation": {
          "$ref": "#/$defs/microsoft.graph.externalConnectors.ruleOperation"
        },
        "property": {
          "type": "string",
          "description": "The property from the externalItem schema. Required."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A collection with one or many strings. One or more specified strings are matched with the specified property using the specified operation. Required."
        },
        "valuesJoinedBy": {
          "$ref": "#/$defs/microsoft.graph.binaryOperator"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.propertyType": {
      "title": "propertyType",
      "enum": [
        "string",
        "int64",
        "double",
        "dateTime",
        "boolean",
        "stringCollection",
        "int64Collection",
        "doubleCollection",
        "dateTimeCollection",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.ruleOperation": {
      "title": "ruleOperation",
      "enum": [
        "null",
        "equals",
        "notEquals",
        "contains",
        "notContains",
        "lessThan",
        "greaterThan",
        "startsWith",
        "unknownFutureValue"
      ],
      "type": "string"
    },
    "microsoft.graph.externalConnectors.schema": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "schema",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "baseType": {
              "type": "string",
              "description": "Must be set to microsoft.graph.externalConnector.externalItem. Required."
            },
            "properties": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/microsoft.graph.externalConnectors.property"
              },
              "description": "The properties defined for the items in the connection. The minimum number of properties is one, the maximum is 128."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.externalConnectors.schema"
    },
    "microsoft.graph.externalConnectors.searchSettings": {
      "title": "searchSettings",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "searchResultTemplates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.externalConnectors.displayTemplate"
          },
          "description": "Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of 2 search result templates per connection."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.externalConnectors.urlToItemResolverBase": {
      "title": "urlToItemResolverBase",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "priority": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": [
            "number",
            "null"
          ],
          "description": "The priority which defines the sequence in which the urlToItemResolverBase instances are evaluated.",
          "format": "int32"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.publicError": {
      "title": "publicError",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Represents the error code."
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.publicErrorDetail"
          },
          "description": "Details of the error."
        },
        "innerError": {
          "anyOf": [
            {
              "$ref": "#/$defs/microsoft.graph.publicInnerError"
            },
            {
              "type": [
                "object",
                "null"
              ]
            }
          ],
          "description": "Details of the inner error."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "A non-localized message for the developer."
        },
        "target": {
          "type": [
            "string",
            "null"
          ],
          "description": "The target of the error."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.publicErrorDetail": {
      "title": "publicErrorDetail",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The error code."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "The error message."
        },
        "target": {
          "type": [
            "string",
            "null"
          ],
          "description": "The target of the error."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "microsoft.graph.publicInnerError": {
      "title": "publicInnerError",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The error code."
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.publicErrorDetail"
          },
          "description": "A collection of error details."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "The error message."
        },
        "target": {
          "type": [
            "string",
            "null"
          ],
          "description": "The target of the error."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  }
}