{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/inforcer/json-schema/inforcer-get-user-summaries-response-schema.json",
  "title": "getUserSummariesResponse",
  "description": "The response to a request to search tenant users",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/inforcer-openapi.json#/components/schemas/getUserSummariesResponse",
  "type": "object",
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "#/$defs/baseResponseEnvelope"
    },
    {
      "type": "object",
      "properties": {
        "continuationToken": {
          "type": [
            "string",
            "null"
          ],
          "description": "A token that can be used to continue the search if there are more results"
        },
        "totalCount": {
          "type": "integer",
          "format": "int64",
          "nullable": false
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/userSummary"
          }
        }
      },
      "required": [
        "totalCount",
        "data"
      ]
    }
  ],
  "$defs": {
    "baseResponseEnvelope": {
      "type": "object",
      "description": "The common properties of responses",
      "additionalProperties": false,
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the request was successful"
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "An optional message"
        },
        "errors": {
          "type": "array",
          "description": "Any errors that occurred during the request",
          "default": [],
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "success",
        "message",
        "errors"
      ]
    },
    "userLicense": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "sku": {
          "type": "string",
          "description": "The unique string identifier for the SKU, also known as the part number e.g. \"EXCHANGESTANDARD\" or \"Microsoft_365_E3_(no_Teams)\"."
        },
        "skuId": {
          "type": "string",
          "format": "guid",
          "description": "The unique identifier of the license SKU"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The display-friendly SKU name e.g. \"Exchange Online (Plan 1)\" or \"Microsoft 365 Business Standard (no Teams)\". May be null if a display name mapping could not be found."
        },
        "capabilityStatus": {
          "type": [
            "string",
            "null"
          ],
          "description": "The capability status of the license"
        },
        "isExpired": {
          "type": "boolean",
          "description": "Is the license expired"
        },
        "isCancelled": {
          "type": "boolean",
          "description": "Is the license cancelled"
        },
        "state": {
          "type": "string",
          "description": "The state of the license assignment"
        }
      }
    },
    "userSummary": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "format": "guid",
          "description": "The user ID"
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The display name of the user"
        },
        "userPrincipalName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user principal name (UPN)"
        },
        "userType": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user type (e.g. Member or Guest)"
        },
        "jobTitle": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's job title"
        },
        "department": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's department"
        },
        "groups": {
          "type": "integer",
          "nullable": false,
          "description": "The number of groups the user is a member of"
        },
        "roles": {
          "type": "integer",
          "nullable": false,
          "description": "The number of roles assigned to the user"
        },
        "assignedLicenses": {
          "type": [
            "array",
            "null"
          ],
          "description": "List of licenses assigned to the user",
          "items": {
            "$ref": "#/$defs/userLicense"
          }
        },
        "isGlobalAdmin": {
          "type": "boolean",
          "description": "Indicates whether the user is a global administrator"
        },
        "isAccountEnabled": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Indicates whether the user account is enabled"
        },
        "isMfaRegistered": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Indicates whether the user is registered for MFA. Null if not licensed."
        },
        "isMfaCapable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Indicates whether the user is capable of MFA. Null if not licensed."
        }
      }
    }
  }
}