{
  "openapi": "3.0.1",
  "servers": [
    {
      "url": "http://localhost:7072/api"
    }
  ],
  "info": {
    "version": "1.0.0",
    "title": "inforcer | Public API",
    "description": "The inforcer Public API built for developers",
    "contact": {
      "email": "engineering@inforcer.com",
      "name": "Engineering",
      "url": "https://inforcer.com"
    }
  },
  "tags": [
    {
      "name": "Testing",
      "description": "Test endpoints for the public API"
    },
    {
      "name": "Tenants",
      "description": "Endpoints for managing tenants in the system"
    },
    {
      "name": "Audit",
      "description": "Endpoints for viewing activity log events in the system"
    },
    {
      "name": "Assessments",
      "description": "Endpoints for managing assessments"
    },
    {
      "name": "Reports",
      "description": "Endpoints for triggering and managing reports"
    }
  ],
  "paths": {
    "/beta/assessments": {
      "get": {
        "summary": "Get assessments",
        "description": "Retrieves a list of available assessments",
        "tags": ["Assessments"],
        "operationId": "getAssessments",
        "responses": {
          "200": {
            "description": "A list of assessments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/assessmentsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/assessments/{assessmentId}/runs": {
      "post": {
        "summary": "Run an assessment",
        "description": "Runs an assessment against a specific tenant and returns compliance results",
        "tags": ["Assessments"],
        "operationId": "runAssessment",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the tenant",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assessmentId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the assessment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Assessment run completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/assessmentRunResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/baselines": {
      "get": {
        "summary": "Get baseline groups",
        "description": "Retrieves a list of baseline groups and the member tenants",
        "tags": ["Tenants"],
        "operationId": "getBaselineGroups",
        "parameters": [
          {
            "name": "baselineTenantId",
            "in": "query",
            "required": false,
            "description": "The id of a baseline tenant to filter baseline groups by. If not provided, all baseline groups will be returned.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of baseline groups and their members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/baselineGroupsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/alignmentScores": {
      "get": {
        "summary": "Get alignment scores",
        "description": "Retrieves a list of alignment scores for all tenants",
        "tags": ["Tenants"],
        "operationId": "getAlignmentScores",
        "responses": {
          "200": {
            "description": "A list of alignment scores",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/alignmentScoresResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants": {
      "get": {
        "summary": "Get all tenants",
        "description": "Retrieves a list of all tenants in the system",
        "tags": ["Tenants"],
        "operationId": "getAllTenants",
        "responses": {
          "200": {
            "description": "A list of tenants",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}": {
      "get": {
        "summary": "Get tenant by ID",
        "description": "Retrieves a single tenant by its unique identifier",
        "tags": ["Tenants"],
        "operationId": "getTenantById",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the tenant",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The tenant details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/policies": {
      "get": {
        "summary": "Get policies for a tenant",
        "description": "Retrieves a list of policies for a specific tenant",
        "tags": ["Tenants"],
        "operationId": "getTenantPolicies",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the tenant",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of policies for the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantPoliciesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/alignmentDetails": {
      "get": {
        "summary": "Get alignment details",
        "description": "Compare policies between baseline and the target tenant with alignment calculation",
        "tags": ["Tenants"],
        "operationId": "getAlignmentDetails",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "ID of the target tenant",
            "example": 285
          },
          {
            "name": "customBaselineId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "description": "ID of the baseline (in GUID format) to compare against. Must be a custom baseline that includes the target tenant as a member.",
            "example": "84b2262f-6fb9-45b7-8856-7903b89749b2"
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantComparisonResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/auditEvents/eventTypes": {
      "get": {
        "summary": "Get event types",
        "description": "Retrieves a list of the types of events returned by the activity log",
        "tags": ["Audit"],
        "operationId": "getEventTypes",
        "responses": {
          "200": {
            "description": "A list of event types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventTypesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/auditEvents/search": {
      "post": {
        "summary": "Search activity log",
        "description": "Searches the activity log based on the provided criteria. Returns a list of matching activity log events.",
        "tags": ["Audit"],
        "operationId": "searchAuditEvents",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/searchAuditEventsRequest"
              },
              "example": {
                "eventTypes": ["authentication", "failedAuthentication"],
                "dateFrom": "2026-02-01T00:00:00Z",
                "dateTo": "2026-02-26T23:59:59Z",
                "pageSize": 50
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The activity log events that were retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/searchAuditEventsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/reports/runs": {
      "get": {
        "summary": "List recent report runs",
        "description": "Retrieves all report runs for the calling client within the last 7 days, newest first",
        "tags": ["Reports"],
        "operationId": "listReportRuns",
        "responses": {
          "200": {
            "description": "A list of recent report runs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reportRunsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "post": {
        "summary": "Queue a report run",
        "description": "Queues a report run for the requested tenants. The response contains the\ncanonical `runId` which the caller can use to poll the `listReportRuns`\noperation for status. The run is processed asynchronously.\nThe run is not idempotent so calling it twice will result in two runs.\n",
        "tags": ["Reports"],
        "operationId": "queueReportRun",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/triggerReportRequest"
              },
              "example": {
                "reports": [
                  {
                    "type": "copilotadoption",
                    "outputFormat": "pdf"
                  }
                ],
                "tenants": {
                  "includeTenants": [1234, 5678]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The report run was queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/triggerReportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/reports/types": {
      "get": {
        "summary": "Get available report types",
        "description": "Retrieves the list of report types that can be triggered, including their supported output formats and any required parameters.",
        "tags": ["Reports"],
        "operationId": "getReportTypes",
        "responses": {
          "200": {
            "description": "A list of available report types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reportTypesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/reports/runs/{reportRunId}/outputs": {
      "get": {
        "summary": "List rendered outputs for a report run",
        "description": "Returns metadata for the rendered output(s) of a terminal report run, filtered to the\napi key's tenant scope. Tenant-specific outputs are included when the output's tenant\nis in the api key's scope; collated outputs (covering multiple tenants) are included\nonly when the api key covers every tenant the run targeted.\n\nTo download the bytes for a single output, call the `getReportRunOutput` operation\nusing the `id` returned here.\n\nReturns 404 if the run does not exist, belongs to a different client, or is not in\na terminal state (`completed` or `completedWithErrors`) — these cases are deliberately\nindistinguishable to avoid leaking run existence across clients. Returns 200 with an\nempty `outputs` array when the run is visible to the api key but no outputs are within\nscope.\n",
        "tags": ["Reports"],
        "operationId": "listReportRunOutputs",
        "parameters": [
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the report run, as returned by the `queueReportRun` operation.",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata for the rendered outputs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reportRunOutputsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/reports/runs/{reportRunId}/outputs/{outputId}": {
      "get": {
        "summary": "Download a single rendered output for a report run",
        "description": "Streams the bytes of a single rendered output for a terminal report run. The\nresponse `Content-Type` reflects the report's output format (`application/json`,\n`text/csv`, `text/html` or `application/pdf`) and a `Content-Disposition` header\nsuggests a filename.\n\nReturns 404 if the run does not exist, belongs to a different client, is not in a\nterminal state (`completed` or `completedWithErrors`), the output ID does not\nbelong to the run, or the output's tenant is outside the api key's tenant scope —\nall cases are deliberately indistinguishable to avoid leaking run/output existence.\nCollated outputs (covering multiple tenants) are only served when the api key covers\nevery tenant the run targeted.\n",
        "tags": ["Reports"],
        "operationId": "getReportRunOutput",
        "parameters": [
          {
            "name": "reportRunId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the report run.",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "outputId",
            "in": "path",
            "required": true,
            "description": "Opaque identifier of the output, as returned by the `listReportRunOutputs` operation.",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The rendered output bytes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/users": {
      "get": {
        "summary": "Search users",
        "description": "Searches the specified tenant for users",
        "operationId": "searchUsers",
        "tags": ["Tenants"],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "inforcer tenant ID (Int).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "The search term to filter users",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "continuationToken",
            "in": "query",
            "required": false,
            "description": "A token to continue a previous search in another page",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/getUserSummariesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/users/{userId}": {
      "get": {
        "summary": "Get user by ID",
        "description": "Retrieves a single user for the specified tenant",
        "operationId": "getUser",
        "tags": ["Tenants"],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "inforcer tenant ID (Int).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "The user ID (GUID).",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/getUserResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/groups": {
      "get": {
        "summary": "Search groups",
        "description": "Searches the specified tenant for Entra groups. Supports optional search filtering by display name.",
        "operationId": "searchGroups",
        "tags": ["Tenants"],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "inforcer tenant ID (Int).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "The search term to filter groups",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "continuationToken",
            "in": "query",
            "required": false,
            "description": "A token to continue a previous search in another page",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of groups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantGroupsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/groups/{groupId}": {
      "get": {
        "summary": "Get group by ID",
        "description": "Retrieves a single group for the specified tenant",
        "operationId": "getGroup",
        "tags": ["Tenants"],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "inforcer tenant ID (Int).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "description": "The group ID (GUID).",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantGroupResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/notFoundError"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/roles": {
      "get": {
        "summary": "Get tenant roles",
        "description": "Retrieves the directory role definitions for the specified tenant.",
        "operationId": "getTenantRoles",
        "tags": ["Tenants"],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "inforcer tenant ID (Int).",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of role definitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantRolesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    },
    "/beta/tenants/{tenantId}/secureScores": {
      "get": {
        "summary": "Get secure scores",
        "description": "Retrieves the current and historic secure score data for the specified tenant. Returns up to 90 days of daily score history.",
        "operationId": "getTenantSecureScores",
        "tags": ["Tenants"],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "description": "inforcer tenant ID (Int).",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the secure score details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenantSecureScoresResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/invalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Inf-Api-Key",
        "description": "The API key for authentication."
      }
    },
    "schemas": {
      "baseResponseEnvelope": {
        "type": "object",
        "description": "The common properties of responses",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the request was successful"
          },
          "message": {
            "type": "string",
            "description": "An optional message",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "description": "Any errors that occurred during the request",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        },
        "required": ["success", "message", "errors"]
      },
      "assessmentRunResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/assessmentRunData"
              }
            }
          }
        ]
      },
      "assessmentRunData": {
        "type": "object",
        "description": "The results of an assessment run",
        "additionalProperties": false,
        "properties": {
          "assessment": {
            "type": "string",
            "description": "The ID of the assessment that was run"
          },
          "name": {
            "type": "string",
            "description": "The name of the assessment that was run",
            "nullable": true
          },
          "results": {
            "type": "array",
            "description": "The compliance check results",
            "items": {
              "$ref": "#/components/schemas/complianceCheckResult"
            }
          }
        }
      },
      "complianceCheckResult": {
        "type": "object",
        "description": "A single compliance check that was evaluated against the tenant's configuration",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for this check"
          },
          "key": {
            "type": "string",
            "description": "A unique machine-readable identifier for this check (e.g. ensure_mfa_enabled_for_all_users)"
          },
          "name": {
            "type": "string",
            "description": "A human-readable name describing what this check evaluates"
          },
          "category": {
            "type": "string",
            "description": "The product area this check applies to (e.g. Entra, Sharepoint, Exchange)"
          },
          "subCategory": {
            "type": "string",
            "description": "A more specific grouping within the category (e.g. Policies, Authentication)"
          },
          "description": {
            "type": "string",
            "description": "A detailed explanation of what this check evaluates and why it matters, including recommended configuration"
          },
          "importance": {
            "type": "string",
            "description": "The severity level of this check — high, medium, or low"
          },
          "impact": {
            "type": "string",
            "nullable": true,
            "description": "A description of the operational impact of enabling the recommended configuration"
          },
          "rationale": {
            "type": "string",
            "nullable": true,
            "description": "The security or compliance rationale for why this check is recommended"
          },
          "remediation": {
            "type": "string",
            "nullable": true,
            "description": "Step-by-step instructions (in markdown) for how to fix a non-compliant result, including UI and PowerShell methods"
          },
          "findings": {
            "$ref": "#/components/schemas/complianceCheckFinding"
          },
          "frameworks": {
            "type": "array",
            "description": "Industry frameworks or standards that reference this check (e.g. CIS Benchmark)",
            "items": {
              "$ref": "#/components/schemas/complianceFramework"
            }
          },
          "tags": {
            "type": "array",
            "description": "Labels for filtering and grouping checks (e.g. security, compliance, copilot readiness)",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "integer",
            "description": "The version number of this check definition"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When this check definition was created"
          },
          "lastUpdated": {
            "type": "string",
            "format": "date-time",
            "description": "When this check definition was last updated"
          }
        }
      },
      "complianceCheckFinding": {
        "type": "object",
        "description": "The evaluation outcome for a compliance check against the tenant",
        "additionalProperties": false,
        "properties": {
          "compliant": {
            "type": "boolean",
            "description": "Whether the tenant fully passes this check. True means all evaluated objects meet the required configuration. False for a check whose data could not be read; see status"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "The outcome of the check. insufficientPermissions and error mean the check was not assessed. May be absent, in which case compliant is the outcome",
            "enum": ["pass", "fail", "insufficientPermissions", "error"]
          },
          "message": {
            "type": "string",
            "nullable": true,
            "description": "A human-readable summary of the finding (e.g. \"3 out of 5 objects are fully-compliant with this check\")"
          },
          "scores": {
            "type": "array",
            "nullable": true,
            "description": "Individual scores for each policy or setting evaluated by this check",
            "items": {
              "$ref": "#/components/schemas/complianceCheckScore"
            }
          }
        }
      },
      "complianceCheckScore": {
        "type": "object",
        "description": "The evaluation score for a single policy or setting against a compliance check",
        "additionalProperties": false,
        "properties": {
          "objectId": {
            "type": "string",
            "description": "The identifier of the evaluated policy or setting"
          },
          "score": {
            "type": "number",
            "description": "Compliance score from 0 to 100, where 100 means fully compliant and 0 means fully non-compliant"
          },
          "objectName": {
            "type": "string",
            "nullable": true,
            "description": "The display name of the evaluated policy or setting"
          },
          "passes": {
            "type": "array",
            "description": "List of conditions that the object met successfully",
            "items": {
              "type": "string"
            }
          },
          "violations": {
            "type": "array",
            "description": "List of conditions that the object failed to meet",
            "items": {
              "type": "string"
            }
          },
          "warnings": {
            "type": "array",
            "description": "List of conditions that may need attention but are not strict failures",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "complianceFramework": {
        "type": "object",
        "description": "An industry framework or standard that a compliance check is mapped to",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the framework (e.g. CIS Microsoft 365 Foundations Benchmark v6.0.0)"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Framework-specific fields such as control number and compliance level (e.g. control, level)"
          }
        }
      },
      "errorResponse": {
        "type": "object",
        "description": "The response to a request that failed",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "data": {
                "type": "object",
                "default": {}
              },
              "errorCode": {
                "type": "string",
                "description": "The error code for the failure"
              }
            }
          }
        ]
      },
      "baselineGroupsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/baselineGroup"
                }
              }
            }
          }
        ]
      },
      "assessmentsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/assessment"
                }
              }
            }
          }
        ]
      },
      "assessment": {
        "type": "object",
        "description": "An assessment available for evaluation",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the assessment"
          },
          "name": {
            "type": "string",
            "description": "The name of the assessment"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "A description of the assessment"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "Tags associated with the assessment"
          },
          "assessmentType": {
            "type": "string",
            "nullable": true,
            "description": "The type of assessment (e.g. platform, custom, community)"
          },
          "lastUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the assessment was last updated"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the assessment was created"
          }
        },
        "required": ["id", "name"]
      },
      "alignmentScoresResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/alignmentScore"
                }
              }
            }
          }
        ]
      },
      "tenantsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/tenant"
                }
              }
            }
          }
        ]
      },
      "tenantResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/tenant"
              }
            }
          }
        ]
      },
      "tenantPoliciesResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/policy"
                }
              }
            }
          }
        ]
      },
      "eventTypesResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/eventType"
                }
              }
            }
          }
        ]
      },
      "reportTypesResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/reportType"
                }
              }
            }
          }
        ]
      },
      "reportType": {
        "type": "object",
        "description": "A report type that can be triggered via the public API",
        "additionalProperties": false,
        "required": [
          "key",
          "name",
          "collatable",
          "supportedOutputFormats",
          "tags",
          "requiredParameters"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique key for this report type, used in the trigger request"
          },
          "name": {
            "type": "string",
            "description": "A human-readable name for the report type"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "A user-friendly description of what the report contains"
          },
          "collatable": {
            "type": "boolean",
            "description": "Whether the report can collate multiple tenants' data into a single output"
          },
          "supportedOutputFormats": {
            "type": "array",
            "description": "Output formats supported by this report type (e.g. pdf, csv, html, json)",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "description": "Categorisation tags for the report type",
            "items": {
              "type": "string"
            }
          },
          "requiredParameters": {
            "type": "array",
            "description": "Parameters that must be supplied when triggering this report type",
            "items": {
              "$ref": "#/components/schemas/reportParameter"
            }
          }
        }
      },
      "reportParameter": {
        "type": "object",
        "description": "A parameter that must be supplied when triggering a report. The `key`\nis passed in the `parameters` map of the trigger request, paired with\none of the `options` values (or a free-form value if `options` is absent).\n",
        "additionalProperties": false,
        "required": ["key", "description"],
        "properties": {
          "key": {
            "type": "string",
            "description": "The parameter key to pass in the `parameters` map when triggering\na report run. Treat as an opaque identifier defined by the report type.\n",
            "example": "report-period"
          },
          "description": {
            "type": "string",
            "description": "Description of what this parameter controls.",
            "example": "Report Period"
          },
          "options": {
            "type": "array",
            "nullable": true,
            "description": "When present, the value supplied for this parameter must be the `key`\nof one of these options. When absent, any string value is accepted.\n",
            "items": {
              "$ref": "#/components/schemas/reportParameterOption"
            }
          }
        }
      },
      "reportParameterOption": {
        "type": "object",
        "description": "An allowed value for a report parameter that has a fixed set of choices.",
        "additionalProperties": false,
        "required": ["key", "description"],
        "properties": {
          "key": {
            "type": "string",
            "description": "The value to supply for the parent parameter in the trigger\nrequest's `parameters` map.\n",
            "example": "30"
          },
          "description": {
            "type": "string",
            "description": "The description for this option, suitable for display to a user.",
            "example": "Last 30 days"
          }
        }
      },
      "baselineGroup": {
        "type": "object",
        "description": "The alignment score for a tenant",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier for the baseline group"
          },
          "name": {
            "type": "string",
            "description": "The name of the baseline group"
          },
          "baselineClientTenantId": {
            "type": "integer",
            "description": "The unique identifier for the baseline tenant"
          },
          "baselineTenantFriendlyName": {
            "type": "string",
            "description": "The name of the baseline tenant"
          },
          "baselineTenantDnsName": {
            "type": "string",
            "description": "The DNS name of the baseline tenant"
          },
          "baselineMsTenantId": {
            "type": "string",
            "format": "guid",
            "description": "The Microsoft tenant ID for the baseline tenant"
          },
          "alignedThreshold": {
            "type": "number",
            "description": "The threshold for the alignment score"
          },
          "semiAlignedThreshold": {
            "type": "number",
            "description": "The semi-aligned threshold for the alignment score"
          },
          "members": {
            "type": "array",
            "description": "The members of the baseline group",
            "items": {
              "$ref": "#/components/schemas/baselineMember"
            },
            "default": []
          },
          "mode": {
            "type": "string",
            "description": "The mode of the baseline group (e.g. include, exclude)"
          },
          "autoAddNewPolicies": {
            "type": "boolean",
            "description": "Whether new policies are automatically added to the baseline group"
          },
          "isComplete": {
            "type": "boolean",
            "description": "Whether this is a full or partial baseline"
          },
          "isShared": {
            "type": "boolean",
            "description": "Whether this baseline is shared"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/includedBaselineItem"
            },
            "nullable": true,
            "description": "List of policy items explicitly configured for this baseline. Each item contains a policy snapshot ID and an alignment assignment flag. This field is null when the baseline does not use explicit items and instead relies on automatic inclusion or exclusion rules."
          }
        }
      },
      "includedBaselineItem": {
        "type": "object",
        "description": "An item included in a custom baseline. Can be a specific policy, nested baseline, or category-based item.",
        "additionalProperties": false,
        "properties": {
          "policySnapshotId": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "The policy snapshot ID included in the baseline"
          },
          "childCustomBaselineId": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "The child baseline ID if this is a nested baseline item"
          },
          "policyCategoryProduct": {
            "type": "string",
            "nullable": true,
            "description": "The product category (e.g., Intune, Entra, Defender) for category-based items"
          },
          "policyCategoryPrimaryGroup": {
            "type": "string",
            "nullable": true,
            "description": "The primary group category (e.g. Settings, Exchange, Windows) for category-based items (requires policyCategoryProduct)"
          },
          "policyCategorySecondaryGroup": {
            "type": "string",
            "nullable": true,
            "description": "The secondary group category (e.g. Custom Indicators, Sensitivity Labels, Compliance Policies) for category-based items (requires policyCategoryProduct and policyCategoryPrimaryGroup)"
          },
          "alignAssignments": {
            "type": "boolean",
            "description": "Whether policy assignments for this item are aligned",
            "default": true
          }
        }
      },
      "baselineMember": {
        "type": "object",
        "description": "A member of a baseline group",
        "additionalProperties": false,
        "properties": {
          "clientTenantId": {
            "type": "integer",
            "description": "The unique identifier for the tenant"
          },
          "tenantFriendlyName": {
            "type": "string",
            "description": "The name of the tenant"
          },
          "tenantDnsName": {
            "type": "string",
            "description": "The DNS name of the tenant"
          },
          "msTenantId": {
            "type": "string",
            "format": "guid",
            "description": "The Microsoft tenant ID for the tenant"
          }
        }
      },
      "alignmentScore": {
        "type": "object",
        "description": "The alignment score for a tenant",
        "additionalProperties": false,
        "properties": {
          "tenantId": {
            "type": "integer",
            "description": "The unique identifier for the tenant"
          },
          "tenantFriendlyName": {
            "type": "string",
            "description": "The friendly name of the tenant"
          },
          "score": {
            "type": "number",
            "description": "The alignment score of the tenant"
          },
          "baselineGroupId": {
            "type": "string",
            "format": "guid",
            "description": "The ID of the aligned baseline"
          },
          "baselineGroupName": {
            "type": "string",
            "description": "The name of the aligned baseline"
          },
          "lastComparisonDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The last time the tenant was aligned"
          }
        }
      },
      "tenant": {
        "type": "object",
        "description": "A tenant in the system",
        "additionalProperties": false,
        "properties": {
          "clientTenantId": {
            "type": "integer",
            "description": "The unique identifier for the tenant"
          },
          "tenantFriendlyName": {
            "type": "string",
            "description": "The name of the tenant"
          },
          "tenantDnsName": {
            "type": "string",
            "description": "The DNS name of the tenant"
          },
          "msTenantId": {
            "type": "string",
            "format": "guid",
            "description": "The Microsoft tenant ID for the tenant"
          },
          "secureScore": {
            "type": "number",
            "description": "The secure score of the tenant"
          },
          "isBaseline": {
            "type": "boolean",
            "description": "Whether the tenant is a baseline tenant"
          },
          "lastBackupTimestamp": {
            "type": "string",
            "format": "date-time",
            "description": "The last time the tenant was backed up"
          },
          "recentChanges": {
            "type": "integer",
            "description": "The number of recent policy changes detected"
          },
          "policyDiff": {
            "type": "string",
            "description": "Text report of added, removed, and changed policies"
          },
          "tags": {
            "type": "array",
            "description": "Tags associated with the tenant",
            "items": {
              "$ref": "#/components/schemas/tenantTag"
            },
            "default": []
          },
          "alignmentSummaries": {
            "type": "array",
            "description": "Alignment summaries for the tenant",
            "items": {
              "$ref": "#/components/schemas/alignmentSummary"
            },
            "default": []
          },
          "licenses": {
            "type": "array",
            "description": "Licenses associated with the tenant",
            "items": {
              "$ref": "#/components/schemas/tenantLicense"
            },
            "default": []
          }
        }
      },
      "alignmentSummary": {
        "type": "object",
        "description": "Summary of alignment scores for a tenant",
        "additionalProperties": false,
        "properties": {
          "alignedBaselineTenantId": {
            "type": "integer",
            "description": "The ID of the tenant"
          },
          "alignedBaselineId": {
            "type": "string",
            "format": "guid",
            "description": "The ID of the aligned baseline"
          },
          "alignedBaselineName": {
            "type": "string",
            "description": "The name of the aligned baseline"
          },
          "alignmentScore": {
            "type": "number",
            "description": "The alignment score of the tenant"
          },
          "alignedThreshold": {
            "type": "number",
            "description": "The threshold for the alignment score"
          },
          "semiAlignedThreshold": {
            "type": "number",
            "description": "The semi-aligned threshold for the alignment score"
          },
          "lastAlignmentDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The last time the tenant was aligned"
          }
        }
      },
      "tenantTag": {
        "type": "object",
        "description": "A tag associated with a tenant",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The ID of the tag"
          },
          "name": {
            "type": "string",
            "description": "The name of the tag"
          },
          "description": {
            "type": "string",
            "description": "A description of the tag"
          }
        }
      },
      "policy": {
        "type": "object",
        "description": "A policy associated with a tenant",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the policy"
          },
          "policyTypeId": {
            "type": "integer",
            "description": "The ID of the policy type"
          },
          "name": {
            "type": "string",
            "description": "The name of the policy",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the policy",
            "nullable": true
          },
          "friendlyName": {
            "type": "string",
            "description": "The friendly name of the policy",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "A description of the policy"
          },
          "readOnly": {
            "type": "boolean",
            "description": "Whether the policy is read-only"
          },
          "product": {
            "type": "string",
            "description": "The product of the policy, used for categorization"
          },
          "primaryGroup": {
            "type": "string",
            "description": "The primary group of the policy, used for categorization"
          },
          "secondaryGroup": {
            "type": "string",
            "description": "The secondary group of the policy, used for categorization",
            "nullable": true
          },
          "platform": {
            "type": "string",
            "description": "The platform of the policy, used for categorization",
            "nullable": true
          },
          "policyCategoryId": {
            "type": "integer",
            "description": "The ID of the policy category",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "description": "Tags associated with the policy",
            "items": {
              "$ref": "#/components/schemas/policyTag"
            },
            "default": []
          },
          "policyData": {
            "type": "object",
            "description": "The policy data",
            "additionalProperties": true
          }
        }
      },
      "policyTag": {
        "type": "object",
        "description": "A tag associated with a tenant",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The ID of the tag"
          },
          "name": {
            "type": "string",
            "description": "The name of the tag"
          },
          "description": {
            "type": "string",
            "description": "A description of the tag"
          }
        }
      },
      "tenantLicense": {
        "type": "object",
        "description": "A license associated with a tenant",
        "additionalProperties": false,
        "properties": {
          "sku": {
            "type": "string",
            "description": "The SKU of the license"
          }
        }
      },
      "eventType": {
        "type": "object",
        "description": "A type that an event may have",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "name of the event type"
          }
        }
      },
      "auditEvent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier for the activity log event"
          },
          "correlationId": {
            "type": "string",
            "nullable": true,
            "format": "guid",
            "description": "The correlation ID for the activity log event, used to group related events together"
          },
          "clientId": {
            "type": "integer",
            "description": "The client tenant ID associated with the event"
          },
          "relType": {
            "type": "string",
            "nullable": true,
            "description": "The type of the related entity for the event, if applicable"
          },
          "relId": {
            "type": "string",
            "nullable": true,
            "description": "The ID of the related entity for the event, if applicable"
          },
          "eventType": {
            "type": "string",
            "description": "The type of the event"
          },
          "message": {
            "type": "string",
            "description": "A message associated with the event",
            "deprecated": true
          },
          "code": {
            "type": "string",
            "description": "A code associated with the event"
          },
          "user": {
            "type": "string",
            "description": "The user associated with the event"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "The time the event occurred",
            "nullable": true
          },
          "metadata": {
            "description": "A dynamic object containing information related to the audit event",
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          }
        }
      },
      "searchAuditEventsRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "user": {
            "type": "string",
            "description": "A user to filter the events by",
            "nullable": true
          },
          "eventTypes": {
            "type": "array",
            "description": "A list of event types to filter the events by",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "type": "string",
            "description": "The start of a date range to filter the events by",
            "nullable": true,
            "format": "date-time"
          },
          "dateTo": {
            "type": "string",
            "description": "The end of a date range to filter the events by",
            "nullable": true,
            "format": "date-time"
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items to return at a time, up to a maximum of 100. If there are more items to return than will fit in a page then a continuation token will be returned.",
            "nullable": true,
            "format": "int32",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "continuationToken": {
            "type": "string",
            "description": "A token to continue a previous search in another page",
            "nullable": true
          }
        }
      },
      "searchAuditEventsResponseData": {
        "type": "object",
        "description": "Activity log events and pagination info",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "description": "The activity log events",
            "items": {
              "$ref": "#/components/schemas/auditEvent"
            }
          },
          "continuationToken": {
            "type": "string",
            "description": "A token that can be used to continue the search if the page size is exceeded",
            "nullable": true
          }
        }
      },
      "searchAuditEventsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "data": {
                "$ref": "#/components/schemas/searchAuditEventsResponseData"
              }
            }
          }
        ]
      },
      "tenantComparisonResponse": {
        "type": "object",
        "description": "Response from tenant policy comparison with alignment metrics",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/tenantComparisonData"
              }
            }
          }
        ]
      },
      "tenantComparisonData": {
        "type": "object",
        "description": "Tenant comparison results with metrics and policy details",
        "additionalProperties": false,
        "properties": {
          "metrics": {
            "$ref": "#/components/schemas/alignmentMetricsData"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the comparison was completed"
          },
          "alignment": {
            "$ref": "#/components/schemas/tenantAlignmentDetailedData",
            "nullable": true,
            "description": "Detailed policy comparison results with full metadata"
          }
        },
        "required": ["metrics", "completedAt"]
      },
      "alignmentMetricsData": {
        "type": "object",
        "description": "Calculated alignment statistics",
        "additionalProperties": false,
        "properties": {
          "totalPolicies": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of policies compared"
          },
          "matchedPolicies": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of exactly matched policies"
          },
          "matchedWithAcceptedDeviations": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of policies matched using accepted deviations"
          },
          "deviatedPolicies": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of policies with unaccepted deviations"
          },
          "recommendedPoliciesFromBaseline": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of policies recommended from baseline that are missing from subject"
          },
          "customerOnlyPolicies": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of policies present only in the customer tenant and not in baseline"
          }
        },
        "required": [
          "totalPolicies",
          "matchedPolicies",
          "matchedWithAcceptedDeviations",
          "deviatedPolicies",
          "recommendedPoliciesFromBaseline",
          "customerOnlyPolicies"
        ]
      },
      "tenantAlignmentDetailedData": {
        "type": "object",
        "description": "Detailed tenant alignment results with individual policy information",
        "additionalProperties": false,
        "properties": {
          "baselineTenantId": {
            "type": "integer",
            "minimum": 1,
            "description": "The baseline tenant ID"
          },
          "subjectTenantId": {
            "type": "integer",
            "minimum": 1,
            "description": "The subject tenant ID"
          },
          "subjectDataTimestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the subject tenant data"
          },
          "baselineDataTimestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the baseline tenant data"
          },
          "alignmentScore": {
            "type": "number",
            "format": "decimal",
            "minimum": 0,
            "maximum": 100,
            "description": "The alignment score percentage"
          },
          "deviatedUnaccepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyComparisonDetail"
            },
            "description": "Policies that deviate from baseline and are not accepted"
          },
          "matchedPolicies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyComparisonDetail"
            },
            "description": "Policies that match baseline exactly"
          },
          "matchedWithAcceptedDeviations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyComparisonDetail"
            },
            "description": "Policies that match baseline using accepted deviations"
          },
          "additionalInSubjectUnaccepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyComparisonDetail"
            },
            "description": "Policies present in subject but missing from baseline"
          },
          "missingFromSubjectUnaccepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyComparisonDetail"
            },
            "description": "Policies present in baseline but missing from subject"
          }
        },
        "required": [
          "baselineTenantId",
          "subjectTenantId",
          "subjectDataTimestamp",
          "baselineDataTimestamp",
          "alignmentScore",
          "deviatedUnaccepted",
          "matchedPolicies",
          "matchedWithAcceptedDeviations",
          "additionalInSubjectUnaccepted",
          "missingFromSubjectUnaccepted"
        ]
      },
      "policyComparisonDetail": {
        "description": "Detailed information about a single policy comparison result",
        "allOf": [
          {
            "$ref": "#/components/schemas/policyDetail"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "baselinePolicySnapshotId": {
                "type": "string",
                "format": "guid",
                "description": "ID of the baseline policy snapshot"
              },
              "baselinePolicySnapshotVersionId": {
                "type": "string",
                "format": "guid",
                "description": "ID of the baseline policy snapshot version"
              },
              "matchingSubjectPolicies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/matchedSubjectPolicy"
                },
                "description": "All subject policies that matched this baseline policy"
              },
              "isDeviation": {
                "type": "boolean",
                "description": "Whether this represents a policy deviation"
              },
              "isMissingFromSubject": {
                "type": "boolean",
                "description": "Whether this policy is missing from the subject tenant"
              },
              "isAdditionalInSubject": {
                "type": "boolean",
                "description": "Whether this policy is missing from the baseline tenant"
              },
              "matchingVariables": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/variableSubstitutionDetail"
                },
                "description": "Variable substitution details found during policy comparison"
              },
              "similarPolicies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/similarPolicyResult"
                },
                "description": "Information about similar policies found"
              },
              "acceptedDeviations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/acceptedDeviationDetail"
                },
                "description": "All accepted deviations for missing policies, ordered by acceptance date (newest first)"
              }
            },
            "required": [
              "matchingSubjectPolicies",
              "isDeviation",
              "isMissingFromSubject",
              "isAdditionalInSubject",
              "matchingVariables"
            ]
          }
        ]
      },
      "policyDetail": {
        "type": "object",
        "description": "Detailed information about a single policy snapshot",
        "additionalProperties": false,
        "properties": {
          "policyGuid": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "GUID of the policy"
          },
          "policyName": {
            "type": "string",
            "description": "Name of the policy"
          },
          "policySnapshotId": {
            "type": "string",
            "format": "guid",
            "description": "ID of the current policy snapshot"
          },
          "policySnapshotVersionId": {
            "type": "string",
            "format": "guid",
            "description": "ID of the current policy snapshot version"
          },
          "policyTypeId": {
            "type": "integer",
            "description": "Policy type identifier"
          },
          "inforcerPolicyTypeName": {
            "type": "string",
            "description": "Friendly policy type name used in inforcer"
          },
          "policyCategoryId": {
            "type": "integer",
            "nullable": true,
            "description": "Policy category identifier"
          },
          "product": {
            "type": "string",
            "nullable": true,
            "description": "The top-level product from policy category (e.g., Intune, Exchange)"
          },
          "primaryGroup": {
            "type": "string",
            "nullable": true,
            "description": "The primary group from policy category (e.g., Android, iOS)"
          },
          "secondaryGroup": {
            "type": "string",
            "nullable": true,
            "description": "The secondary group from policy category (e.g., Configuration Profiles)"
          },
          "platform": {
            "type": "string",
            "nullable": true,
            "description": "The platform from policy category (e.g., Android Device Administrator)"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Policy description from the policyJson if available"
          },
          "isPolicyDeleteDisabled": {
            "type": "boolean",
            "description": "Whether delete protection is enabled for this policy"
          },
          "isPolicyDeployable": {
            "type": "boolean",
            "description": "Whether this policy can be deployed"
          },
          "policyTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyTag"
            },
            "description": "Policy tags associated with the policy"
          },
          "readOnly": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the policy is read-only"
          },
          "fullAccessLicenseRequirements": {
            "type": "array",
            "description": "Tenant requires one or more of these licenses for full access to this policy",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "policyName",
          "policyTypeId",
          "inforcerPolicyTypeName",
          "isPolicyDeleteDisabled",
          "isPolicyDeployable",
          "policyTags",
          "fullAccessLicenseRequirements"
        ]
      },
      "matchedSubjectPolicy": {
        "type": "object",
        "description": "Information about a single subject policy that matched the baseline policy",
        "additionalProperties": false,
        "properties": {
          "subjectPolicySnapshotId": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "ID of the subject policy snapshot"
          },
          "subjectPolicySnapshotVersionId": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "ID of the subject policy snapshot version"
          },
          "subjectPolicyGuid": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "GUID of the subject policy"
          },
          "policyDataDiff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/patchOperation"
            },
            "description": "Policy data differences for this specific subject policy"
          },
          "policyAssignmentsDiff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/patchOperation"
            },
            "description": "Policy assignment differences for this specific subject policy"
          },
          "policyTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/policyTag"
            },
            "description": "Policy tags associated with this subject policy"
          },
          "acceptedDeviations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/acceptedDeviationDetail"
            },
            "description": "All accepted deviations for this specific subject policy match, ordered by acceptance date (newest first)"
          }
        },
        "required": [
          "subjectPolicyGuid",
          "policyDataDiff",
          "policyAssignmentsDiff"
        ]
      },
      "variableSubstitutionDetail": {
        "type": "object",
        "description": "Details of a variable substitution found during policy comparison",
        "additionalProperties": false,
        "properties": {
          "variableId": {
            "type": "string",
            "format": "guid",
            "description": "The id of the client variable"
          },
          "variableName": {
            "type": "string",
            "description": "The name of the client variable"
          },
          "baselineValue": {
            "type": "string",
            "description": "The baseline tenant's variable value (null if missing from baseline)",
            "nullable": true
          },
          "subjectValue": {
            "type": "string",
            "description": "The subject tenant's variable value (null if missing from subject)",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The optional description of the client variable",
            "nullable": true
          },
          "propertyPath": {
            "type": "string",
            "description": "The JSON path where this variable substitution occurs in the policy"
          },
          "isHidden": {
            "type": "boolean",
            "description": "Whether or not the variable is marked as hidden, and so the values will be unavailable"
          },
          "isBaselineOnly": {
            "type": "boolean",
            "description": "Whether this variable was found by scanning the baseline policy JSON (true) or by matching a diff between baseline and subject (false). Baseline-only variables are useful for deployment but don't explain a specific diff."
          }
        },
        "required": [
          "variableId",
          "variableName",
          "propertyPath",
          "isBaselineOnly"
        ]
      },
      "patchOperation": {
        "type": "object",
        "description": "A single JSON patch operation",
        "additionalProperties": false,
        "properties": {
          "op": {
            "type": "string",
            "description": "The patch operation type"
          },
          "path": {
            "type": "string",
            "description": "JSON path to the changed property"
          },
          "baselineValue": {
            "type": "string",
            "description": "Value in the baseline policy (stringified JSON)",
            "nullable": true
          },
          "subjectValue": {
            "type": "string",
            "description": "Value in the subject policy (stringified JSON)",
            "nullable": true
          }
        },
        "required": ["op", "path"]
      },
      "acceptedDeviationDetail": {
        "type": "object",
        "description": "Details of an accepted deviation",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "ID of the accepted deviation"
          },
          "acceptedDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the deviation was accepted"
          },
          "acceptedByUsername": {
            "type": "string",
            "nullable": true,
            "description": "Username who accepted the deviation"
          },
          "acceptedByUserId": {
            "type": "integer",
            "nullable": true,
            "description": "ID of user who accepted the deviation"
          },
          "acceptedReason": {
            "type": "string",
            "nullable": true,
            "description": "Reason for accepting the deviation"
          },
          "acceptAllChanges": {
            "type": "boolean",
            "description": "Indicates that the deviation applied without individual patch operations"
          },
          "isObsolete": {
            "type": "boolean",
            "description": "Indicates that this accepted deviation was not applied because it is obsolete (policies now align without it)"
          },
          "policyDataDiff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/patchOperation"
            },
            "description": "Policy JSON patch operations associated with the accepted deviation"
          },
          "policyAssignmentsDiff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/patchOperation"
            },
            "description": "Assignment JSON patch operations associated with the accepted deviation"
          },
          "validUntil": {
            "type": "string",
            "format": "date-time",
            "description": "(Optional) The date/time until which this deviation is valid"
          },
          "originalBaselineValue": {
            "type": "string",
            "nullable": true,
            "description": "The original baseline value when the deviation was created (stringified JSON). May not reflect current baseline state."
          }
        },
        "required": ["acceptedDateTime"]
      },
      "similarPolicyResult": {
        "type": "object",
        "description": "Details about a subject policy that closely matches the baseline policy",
        "additionalProperties": false,
        "properties": {
          "policyGuid": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "GUID of the similar subject policy"
          },
          "policySnapshotId": {
            "type": "string",
            "format": "guid",
            "description": "Snapshot ID of the similar subject policy"
          },
          "policySnapshotVersionId": {
            "type": "string",
            "format": "guid",
            "description": "Snapshot version ID of the similar subject policy"
          },
          "policyName": {
            "type": "string",
            "description": "Display name of the similar subject policy"
          },
          "policyTypeId": {
            "type": "integer",
            "description": "Policy type identifier of the subject policy"
          },
          "policyTypeName": {
            "type": "string",
            "nullable": true,
            "description": "Friendly policy type name of the subject policy"
          },
          "policyCategoryId": {
            "type": "integer",
            "nullable": true,
            "description": "Policy category identifier of the subject policy"
          },
          "policyCategoryName": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable policy category name of the subject policy"
          },
          "policyTags": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/policyTag"
                },
                {
                  "type": "object"
                }
              ]
            },
            "description": "Tags associated with the subject policy"
          },
          "isPolicyRenameDisabled": {
            "type": "boolean",
            "description": "Whether the subject policy can be renamed"
          },
          "similarityScore": {
            "type": "number",
            "format": "decimal",
            "description": "Similarity score between baseline and subject policies (0-1)"
          },
          "similarityReason": {
            "$ref": "#/components/schemas/similarityReasonBreakdown"
          },
          "matchPercentage": {
            "type": "number",
            "format": "decimal",
            "description": "Match percentage between baseline and subject policies (0-100)"
          },
          "diffCount": {
            "type": "integer",
            "description": "Number of differences between the baseline and subject policies"
          },
          "matchCount": {
            "type": "integer",
            "description": "Number of matching properties between the baseline and subject policies"
          },
          "policyDataDiff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/patchOperation"
            },
            "description": "Differences between the baseline and subject policy definitions"
          },
          "policyAssignmentsDiff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/patchOperation"
            },
            "description": "Differences between the baseline and subject policy assignments"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Timestamp when the subject policy was last modified"
          }
        },
        "required": [
          "policyGuid",
          "policySnapshotId",
          "policyName",
          "policyTypeId",
          "isPolicyRenameDisabled",
          "matchPercentage",
          "diffCount",
          "matchCount",
          "policyDataDiff",
          "policyAssignmentsDiff"
        ]
      },
      "similarityReasonBreakdown": {
        "type": "object",
        "description": "Breakdown of similarity scores by category",
        "additionalProperties": false,
        "properties": {
          "summary": {
            "type": "string",
            "description": "Overall similarity summary"
          },
          "critical": {
            "type": "number",
            "format": "decimal",
            "description": "Critical settings similarity percentage (0-100)"
          },
          "configuration": {
            "type": "number",
            "format": "decimal",
            "description": "Configuration settings similarity percentage (0-100)"
          },
          "assignments": {
            "type": "number",
            "format": "decimal",
            "description": "Assignment similarity percentage (0-100)"
          },
          "metadata": {
            "type": "number",
            "format": "decimal",
            "description": "Metadata similarity percentage (0-100)"
          }
        },
        "required": ["summary"]
      },
      "getUserResponse": {
        "type": "object",
        "description": "The response to a request to get a single tenant user",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/user"
              }
            }
          }
        ]
      },
      "user": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "The user ID"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "The display name of the user"
          },
          "givenName": {
            "type": "string",
            "nullable": true,
            "description": "The user's first name"
          },
          "surname": {
            "type": "string",
            "nullable": true,
            "description": "The user's last name"
          },
          "userPrincipalName": {
            "type": "string",
            "nullable": true,
            "description": "The user principal name (UPN)"
          },
          "userType": {
            "type": "string",
            "nullable": true,
            "description": "The user type (e.g. Member or Guest)"
          },
          "jobTitle": {
            "type": "string",
            "nullable": true,
            "description": "The user's job title"
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "The user's department"
          },
          "mail": {
            "type": "string",
            "nullable": true,
            "description": "The user's email address"
          },
          "mobilePhone": {
            "type": "string",
            "nullable": true,
            "description": "The user's mobile phone number"
          },
          "businessPhones": {
            "type": "array",
            "nullable": true,
            "description": "List of business phone numbers",
            "items": {
              "type": "string"
            }
          },
          "officeLocation": {
            "type": "string",
            "nullable": true,
            "description": "The user's office location"
          },
          "streetAddress": {
            "type": "string",
            "nullable": true,
            "description": "The user's street address"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "description": "The user's city"
          },
          "state": {
            "type": "string",
            "nullable": true,
            "description": "The user's state"
          },
          "postalCode": {
            "type": "string",
            "nullable": true,
            "description": "The user's postal code"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "The user's country"
          },
          "preferredLanguage": {
            "type": "string",
            "nullable": true,
            "description": "The user's preferred language"
          },
          "accountEnabled": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user account is enabled"
          },
          "usageLocation": {
            "type": "string",
            "nullable": true,
            "description": "The user's usage location"
          },
          "createdDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the user was created"
          },
          "lastPasswordChangeDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the user last changed their password"
          },
          "lastSignInDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the user last signed in"
          },
          "companyName": {
            "type": "string",
            "nullable": true,
            "description": "The user's company name"
          },
          "employeeId": {
            "type": "string",
            "nullable": true,
            "description": "The user's employee ID"
          },
          "employeeType": {
            "type": "string",
            "nullable": true,
            "description": "The user's employee type"
          },
          "employeeHireDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The user's hire date"
          },
          "mailNickname": {
            "type": "string",
            "nullable": true,
            "description": "The user's mail alias"
          },
          "preferredDataLocation": {
            "type": "string",
            "nullable": true,
            "description": "The user's preferred data location"
          },
          "onPremisesSyncEnabled": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user is synced from on-premises"
          },
          "otherMails": {
            "type": "array",
            "nullable": true,
            "description": "Other email addresses for the user",
            "items": {
              "type": "string"
            }
          },
          "proxyAddresses": {
            "type": "array",
            "nullable": true,
            "description": "Proxy addresses for the user",
            "items": {
              "type": "string"
            }
          },
          "creationType": {
            "type": "string",
            "nullable": true,
            "description": "The type of user creation"
          },
          "passwordPolicies": {
            "type": "string",
            "nullable": true,
            "description": "Password policies applied to the user"
          },
          "signInSessionsValidFromDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date and time from which sign-in sessions are valid"
          },
          "imAddresses": {
            "type": "array",
            "nullable": true,
            "description": "Instant messaging addresses",
            "items": {
              "type": "string"
            }
          },
          "legalAgeGroupClassification": {
            "type": "string",
            "nullable": true,
            "description": "Legal age group classification"
          },
          "onPremisesLastSyncDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last on-premises sync date and time"
          },
          "onPremisesDistinguishedName": {
            "type": "string",
            "nullable": true,
            "description": "The on-premises distinguished name"
          },
          "onPremisesDomainName": {
            "type": "string",
            "nullable": true,
            "description": "The on-premises domain name"
          },
          "onPremisesImmutableId": {
            "type": "string",
            "nullable": true,
            "description": "The on-premises immutable ID"
          },
          "onPremisesSecurityIdentifier": {
            "type": "string",
            "nullable": true,
            "description": "The on-premises security identifier"
          },
          "onPremisesSamAccountName": {
            "type": "string",
            "nullable": true,
            "description": "The on-premises SAM account name"
          },
          "onPremisesUserPrincipalName": {
            "type": "string",
            "nullable": true,
            "description": "The on-premises user principal name"
          },
          "manager": {
            "$ref": "#/components/schemas/directoryObject",
            "nullable": true,
            "description": "The user's manager"
          },
          "groups": {
            "type": "array",
            "nullable": true,
            "description": "Groups the user is a transitive member of",
            "items": {
              "$ref": "#/components/schemas/userGroup"
            }
          },
          "roles": {
            "type": "array",
            "nullable": true,
            "description": "Directory roles assigned to the user",
            "items": {
              "$ref": "#/components/schemas/role"
            }
          },
          "devices": {
            "type": "array",
            "nullable": true,
            "description": "Devices owned by the user",
            "items": {
              "$ref": "#/components/schemas/userDevice"
            }
          },
          "isGlobalAdmin": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user is a global administrator"
          },
          "isCloudOnly": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user is a cloud-only user"
          },
          "isHybrid": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user is a hybrid user"
          },
          "isMfaRegistered": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user is registered for MFA. Null if not licensed."
          },
          "isMfaCapable": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the user is capable of MFA. Null if not licensed."
          },
          "isAllDevicesCompliant": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether all devices owned by the user are compliant"
          },
          "riskState": {
            "type": "string",
            "nullable": true,
            "description": "The risk state of the user. Null if not licensed."
          },
          "riskDetail": {
            "type": "string",
            "nullable": true,
            "description": "The risk detail of the user. Null if not licensed."
          },
          "riskLevel": {
            "type": "string",
            "nullable": true,
            "description": "The risk level of the user. Null if not licensed."
          },
          "appRoleAssignments": {
            "type": "array",
            "nullable": true,
            "description": "App role assignments for the user",
            "items": {
              "$ref": "#/components/schemas/appRoleAssignment"
            }
          },
          "assignedLicenses": {
            "type": "array",
            "nullable": true,
            "description": "Licenses assigned to the user",
            "items": {
              "$ref": "#/components/schemas/userLicense"
            }
          }
        }
      },
      "directoryObject": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "appRoleAssignment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "appRoleId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "principalDisplayName": {
            "type": "string",
            "nullable": true
          },
          "principalId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "principalType": {
            "type": "string",
            "nullable": true
          },
          "resourceDisplayName": {
            "type": "string",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "getUserSummariesResponse": {
        "type": "object",
        "description": "The response to a request to search tenant users",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "continuationToken": {
                "type": "string",
                "description": "A token that can be used to continue the search if there are more results",
                "nullable": true
              },
              "totalCount": {
                "type": "integer",
                "format": "int64",
                "nullable": false
              },
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/userSummary"
                }
              }
            },
            "required": ["totalCount", "data"]
          }
        ]
      },
      "userSummary": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "nullable": true,
            "description": "The user ID"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "The display name of the user"
          },
          "userPrincipalName": {
            "type": "string",
            "nullable": true,
            "description": "The user principal name (UPN)"
          },
          "userType": {
            "type": "string",
            "nullable": true,
            "description": "The user type (e.g. Member or Guest)"
          },
          "jobTitle": {
            "type": "string",
            "nullable": true,
            "description": "The user's job title"
          },
          "department": {
            "type": "string",
            "nullable": true,
            "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",
            "description": "List of licenses assigned to the user",
            "items": {
              "$ref": "#/components/schemas/userLicense"
            },
            "nullable": true
          },
          "isGlobalAdmin": {
            "type": "boolean",
            "description": "Indicates whether the user is a global administrator"
          },
          "isAccountEnabled": {
            "type": "boolean",
            "description": "Indicates whether the user account is enabled",
            "nullable": true
          },
          "isMfaRegistered": {
            "type": "boolean",
            "description": "Indicates whether the user is registered for MFA. Null if not licensed.",
            "nullable": true
          },
          "isMfaCapable": {
            "type": "boolean",
            "description": "Indicates whether the user is capable of MFA. Null if not licensed.",
            "nullable": true
          }
        }
      },
      "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",
            "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.",
            "nullable": true
          },
          "capabilityStatus": {
            "type": "string",
            "description": "The capability status of the license",
            "nullable": true
          },
          "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"
          }
        }
      },
      "userGroup": {
        "type": "object",
        "description": "A group the user is a member of",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier of the group"
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the group"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the group"
          },
          "groupTypes": {
            "type": "array",
            "description": "A string list of the types of groups",
            "items": {
              "type": "string"
            }
          }
        },
        "required": ["id", "displayName", "groupTypes"]
      },
      "tenantGroupsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "continuationToken": {
                "type": "string",
                "description": "A token that can be used to continue the search if there are more results",
                "nullable": true
              },
              "totalCount": {
                "type": "integer",
                "format": "int64",
                "nullable": false,
                "description": "The total number of groups matching the search criteria"
              },
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/tenantGroupSummary"
                }
              }
            },
            "required": ["totalCount", "data"]
          }
        ]
      },
      "tenantGroupResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/tenantGroupDetails"
              }
            }
          }
        ]
      },
      "tenantGroupSummary": {
        "type": "object",
        "description": "A summary of an Entra group",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The group ID"
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the group"
          },
          "description": {
            "type": "string",
            "description": "The description of the group",
            "nullable": true
          },
          "mail": {
            "type": "string",
            "description": "The email address of the group",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "description": "The visibility of the group (e.g., Public, Private)",
            "nullable": true
          },
          "membershipRule": {
            "type": "string",
            "description": "The dynamic membership rule (only populated for groups whose groupTypes contains DynamicMembership)",
            "nullable": true
          },
          "groupTypes": {
            "type": "array",
            "description": "The types of the group",
            "items": {
              "type": "string"
            }
          }
        },
        "required": ["id", "displayName", "groupTypes"]
      },
      "tenantGroupDetails": {
        "type": "object",
        "description": "Detailed information about an Entra group",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The group ID"
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the group"
          },
          "description": {
            "type": "string",
            "description": "The description of the group",
            "nullable": true
          },
          "mail": {
            "type": "string",
            "description": "The email address of the group",
            "nullable": true
          },
          "mailNickname": {
            "type": "string",
            "description": "The mail nickname of the group",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "description": "The visibility of the group (e.g., Public, Private)",
            "nullable": true
          },
          "membershipRule": {
            "type": "string",
            "description": "The dynamic membership rule (if applicable)",
            "nullable": true
          },
          "groupTypes": {
            "type": "array",
            "description": "The types of the group",
            "items": {
              "type": "string"
            }
          },
          "createdDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the group was created",
            "nullable": true
          },
          "mailEnabled": {
            "type": "boolean",
            "description": "Whether the group is mail-enabled",
            "nullable": true
          },
          "onPremisesSyncEnabled": {
            "type": "boolean",
            "description": "Whether the group is synchronized with on-premises",
            "nullable": true
          },
          "members": {
            "type": "array",
            "description": "The members of the group",
            "items": {
              "$ref": "#/components/schemas/tenantGroupMember"
            }
          }
        },
        "required": ["id", "displayName", "groupTypes"]
      },
      "tenantGroupMember": {
        "type": "object",
        "description": "A member of an Entra group",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The member ID"
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the member",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "The OData type of the member (e.g., #microsoft.graph.user, #microsoft.graph.group, #microsoft.graph.servicePrincipal)",
            "nullable": true
          }
        },
        "required": ["id"]
      },
      "tenantRolesResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/tenantRole"
                }
              }
            },
            "required": ["data"]
          }
        ]
      },
      "tenantRole": {
        "type": "object",
        "description": "A directory role definition for a tenant",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier of the role definition"
          },
          "templateId": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier of the role definition template",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the role definition"
          },
          "description": {
            "type": "string",
            "description": "The description of the role definition"
          },
          "isBuiltIn": {
            "type": "boolean",
            "description": "Whether the role definition is built-in"
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the role definition is enabled",
            "nullable": true
          },
          "isPrivileged": {
            "type": "boolean",
            "description": "Whether the role definition is privileged",
            "nullable": true
          }
        },
        "required": ["id", "displayName", "description"]
      },
      "tenantSecureScoresResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/tenantSecureScoreDetails"
              }
            }
          }
        ]
      },
      "tenantSecureScoreDetails": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "scores": {
            "type": "array",
            "description": "The list of historic secure scores",
            "items": {
              "$ref": "#/components/schemas/tenantSecureScore"
            }
          },
          "currentScore": {
            "type": "number",
            "description": "The current secure score"
          },
          "maxScore": {
            "type": "number",
            "description": "The maximum possible secure score"
          },
          "currentScorePercentage": {
            "type": "number",
            "description": "The current score expressed as a percentage"
          },
          "licensedUserCount": {
            "type": "integer",
            "description": "The total number of licensed users"
          },
          "enabledServices": {
            "type": "array",
            "description": "The enabled services for this tenant",
            "items": {
              "type": "string"
            }
          },
          "controlProfiles": {
            "type": "array",
            "description": "The actionable secure score control profiles",
            "items": {
              "$ref": "#/components/schemas/tenantSecureScoreControlProfile"
            }
          },
          "controlCategoryScores": {
            "type": "array",
            "description": "Control category secure scores and history",
            "items": {
              "$ref": "#/components/schemas/tenantControlCategoryScore"
            }
          }
        }
      },
      "tenantSecureScore": {
        "type": "object",
        "additionalProperties": false,
        "required": ["currentScore", "maxScore", "createdDateTime"],
        "properties": {
          "currentScore": {
            "type": "number",
            "description": "The score at this date"
          },
          "maxScore": {
            "type": "number",
            "description": "The maximum possible secure score"
          },
          "currentScorePercentage": {
            "type": "number",
            "description": "The current score expressed as a percentage"
          },
          "createdDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The date the secure score was created"
          }
        }
      },
      "tenantSecureScoreControlProfile": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the control profile"
          },
          "title": {
            "type": "string",
            "description": "The title of the control profile"
          },
          "controlCategory": {
            "type": "string",
            "description": "The category of the control profile"
          },
          "remediation": {
            "type": "string",
            "description": "The remediation steps",
            "nullable": true
          },
          "remediationImpact": {
            "type": "string",
            "description": "The impact of the remediation",
            "nullable": true
          },
          "actionUrl": {
            "type": "string",
            "description": "The URL for the action to take",
            "nullable": true
          },
          "service": {
            "type": "string",
            "description": "The associated service",
            "nullable": true
          },
          "maxScore": {
            "type": "number",
            "description": "The maximum score for this control"
          },
          "maxScorePercentage": {
            "type": "number",
            "description": "The maximum score as a percentage of total"
          },
          "currentScore": {
            "type": "number",
            "description": "The current score for this control"
          },
          "currentScorePercentage": {
            "type": "number",
            "description": "The current score as a percentage of total"
          },
          "scoreDifference": {
            "type": "number",
            "description": "The difference between current and max score"
          },
          "scoreDifferencePercentage": {
            "type": "number",
            "description": "The score difference as a percentage of total"
          }
        }
      },
      "tenantControlCategoryScore": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "controlCategory": {
            "type": "string",
            "description": "The category of the secure score"
          },
          "maxScore": {
            "type": "number",
            "description": "The max score for this category"
          },
          "currentScore": {
            "type": "number",
            "description": "The current score for this category"
          },
          "currentScorePercentage": {
            "type": "number",
            "description": "The current score as a percentage"
          },
          "historicScores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tenantControlCategoryScoreHistoric"
            }
          }
        }
      },
      "tenantControlCategoryScoreHistoric": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "maxScore": {
            "type": "number"
          },
          "currentScore": {
            "type": "number"
          },
          "currentScorePercentage": {
            "type": "number"
          },
          "createdDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "role": {
        "type": "object",
        "description": "A directory role assigned to the user",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "roleTemplateId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "userDevice": {
        "type": "object",
        "description": "A device owned by the user",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier of the device"
          },
          "complianceExpiryDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deviceCategory": {
            "type": "string",
            "nullable": true
          },
          "deviceOwnership": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "isCompliant": {
            "type": "boolean",
            "nullable": true
          },
          "isManaged": {
            "type": "boolean",
            "nullable": true
          },
          "isManagementRestricted": {
            "type": "boolean",
            "nullable": true
          },
          "isRooted": {
            "type": "boolean",
            "nullable": true
          },
          "managementType": {
            "type": "string",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "operatingSystem": {
            "type": "string",
            "nullable": true
          },
          "operatingSystemVersion": {
            "type": "string",
            "nullable": true
          },
          "profileType": {
            "type": "string",
            "nullable": true
          },
          "registrationDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trustType": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "reportRunsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "required": ["data"],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/reportRunsData"
              }
            }
          }
        ]
      },
      "reportRunsData": {
        "type": "object",
        "description": "Container for the report-runs list",
        "additionalProperties": false,
        "properties": {
          "runs": {
            "type": "array",
            "description": "Report runs from the last 7 days, ordered newest-first. Capped at 500 entries.",
            "default": [],
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/reportRunSummary"
            }
          }
        },
        "required": ["runs"]
      },
      "reportRunSummary": {
        "type": "object",
        "description": "Summary of a single report run",
        "additionalProperties": false,
        "properties": {
          "runId": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier for the report run"
          },
          "status": {
            "type": "string",
            "description": "The lifecycle status of the report run",
            "enum": ["running", "completed", "completedWithErrors", "failed"]
          },
          "reportTypes": {
            "type": "array",
            "description": "The report types covered by this run. A run can span multiple types when bundled together.",
            "items": {
              "type": "string"
            }
          },
          "outputFormats": {
            "type": "array",
            "description": "The output formats produced by this run. Known values: `csv`, `json`, `html`, `pdf`.\nNew formats may be added — clients should treat unknown values as informational rather than failing.\n",
            "items": {
              "type": "string"
            }
          },
          "triggeredByType": {
            "type": "string",
            "description": "How the run was triggered",
            "enum": ["user", "scheduled"]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the run was first recorded (ISO-8601 with UTC offset)"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When rendering started; null until the orchestration picks up the trigger"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the run reached a terminal status; null while still running"
          },
          "outputCount": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "description": "Number of successful report outputs produced; null while still running or for failed runs with no outputs"
          }
        },
        "required": [
          "runId",
          "status",
          "reportTypes",
          "outputFormats",
          "triggeredByType",
          "createdAt",
          "startedAt",
          "completedAt",
          "outputCount"
        ]
      },
      "triggerReportRequest": {
        "type": "object",
        "description": "Body for queueing a report run",
        "additionalProperties": false,
        "required": ["reports", "tenants"],
        "properties": {
          "reports": {
            "type": "array",
            "description": "One or more reports to generate as part of this run",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/triggerReportItem"
            }
          },
          "tenants": {
            "$ref": "#/components/schemas/triggerReportTenants"
          }
        }
      },
      "triggerReportItem": {
        "type": "object",
        "additionalProperties": false,
        "required": ["type", "outputFormat"],
        "properties": {
          "type": {
            "type": "string",
            "description": "The report type key, matching `reportType.key` from the `getReportTypes` operation (e.g. copilotadoption, activeusercount)."
          },
          "outputFormat": {
            "type": "string",
            "description": "Output format for this report item",
            "enum": ["pdf", "csv", "html", "json"]
          },
          "collate": {
            "type": "boolean",
            "default": false,
            "description": "When true, combine outputs across all tenants into a single document"
          },
          "parameters": {
            "type": "object",
            "description": "Optional key/value parameters specific to the report type",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "triggerReportTenants": {
        "type": "object",
        "description": "Tenant scope for the report run",
        "additionalProperties": false,
        "required": ["includeTenants"],
        "properties": {
          "includeTenants": {
            "type": "array",
            "description": "Tenant IDs the run should cover. Must be a non-empty subset of the\ntenants the calling API key has access to.\n",
            "minItems": 1,
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "triggerReportResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "required": ["data"],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/triggerReportData"
              }
            }
          }
        ]
      },
      "reportRunOutputsResponse": {
        "type": "object",
        "additionalProperties": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/baseResponseEnvelope"
          },
          {
            "type": "object",
            "required": ["data"],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/reportRunOutputsData"
              }
            }
          }
        ]
      },
      "reportRunOutputsData": {
        "type": "object",
        "additionalProperties": false,
        "required": ["outputs"],
        "properties": {
          "outputs": {
            "type": "array",
            "description": "One entry per rendered blob produced by the run. Empty for completed runs that produced no outputs.",
            "default": [],
            "items": {
              "$ref": "#/components/schemas/reportRunOutput"
            }
          }
        }
      },
      "reportRunOutput": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "reportType", "format"],
        "properties": {
          "id": {
            "type": "string",
            "format": "guid",
            "description": "Stable opaque identifier for the output. Pass to the `getReportRunOutput` operation to download the bytes."
          },
          "reportType": {
            "type": "string",
            "description": "The report type key this output was rendered for, matching `reportType.key` from the `getReportTypes` operation (e.g. \"copilotadoption\", \"activeusercount\")."
          },
          "tenantId": {
            "type": "integer",
            "nullable": true,
            "description": "The inforcer tenant ID this output relates to. Null for outputs collated across multiple tenants."
          },
          "format": {
            "type": "string",
            "description": "The output format, lower-cased file extension. Matches the `Content-Type`\nreturned by the per-output download endpoint. Known values: `csv`, `json`,\n`html`, `pdf`. New formats may be added — clients should treat unknown\nvalues as informational; the download endpoint serves unknown formats as\n`application/octet-stream`.\n"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "minimum": 0,
            "description": "Size of the rendered output in bytes. Nullable when the renderer did not record a size at terminal-event time."
          }
        }
      },
      "triggerReportData": {
        "type": "object",
        "description": "Identifiers returned when a report run is queued",
        "additionalProperties": false,
        "required": ["runId"],
        "properties": {
          "runId": {
            "type": "string",
            "format": "guid",
            "description": "The unique identifier for the queued run; use with the `listReportRuns` operation to poll status. Matches the `runId` field returned by `listReportRuns`."
          }
        }
      }
    },
    "responses": {
      "internalServerError": {
        "description": "An unexpected error occurred",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorResponse"
            },
            "examples": {
              "Internal Server Error": {
                "value": {
                  "success": false,
                  "message": "Something went pop",
                  "errors": ["It was the weasel"]
                }
              }
            }
          }
        }
      },
      "conflict": {
        "description": "A response returned when a conflict occurs",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorResponse"
            },
            "examples": {
              "conflict": {
                "value": {
                  "success": false,
                  "message": "A conflict occurred",
                  "errors": ["The resource is already in use"]
                }
              }
            }
          }
        }
      },
      "notFoundError": {
        "description": "A response returned when a resource cannot be found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorResponse"
            },
            "examples": {
              "notFoundError": {
                "value": {
                  "success": false,
                  "message": "The resource 'derp' could not be found",
                  "errors": ["Could not find the magic"]
                }
              }
            }
          }
        }
      },
      "invalidRequest": {
        "description": "The request was invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorResponse"
            },
            "examples": {
              "badRequest": {
                "value": {
                  "success": false,
                  "message": "One or more validation errors occurred",
                  "errors": ["userId is required and must be a valid integer"]
                }
              }
            }
          }
        }
      },
      "forbidden": {
        "description": "You are not permitted to carry out this operation",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorResponse"
            },
            "examples": {
              "forbidden": {
                "value": {
                  "success": false,
                  "message": "Client tenant verification failed",
                  "errors": [
                    "First years are not permitted to access the Forbidden Forest"
                  ]
                }
              }
            }
          }
        }
      },
      "unauthorized": {
        "description": "You are not authorized to access this endpoint",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/errorResponse"
            },
            "examples": {
              "unauthorized": {
                "value": {
                  "success": false,
                  "message": "Your credentials are invalid or you are not logged in",
                  "errors": ["Please verify your credentials"]
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ]
}
