{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/inforcer/json-schema/inforcer-tenant-groups-response-schema.json",
  "title": "tenantGroupsResponse",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/inforcer-openapi.json#/components/schemas/tenantGroupsResponse",
  "type": "object",
  "additionalProperties": false,
  "allOf": [
    {
      "$ref": "#/$defs/baseResponseEnvelope"
    },
    {
      "type": "object",
      "properties": {
        "continuationToken": {
          "type": [
            "string",
            "null"
          ],
          "description": "A token that can be used to continue the search if there are more results"
        },
        "totalCount": {
          "type": "integer",
          "format": "int64",
          "nullable": false,
          "description": "The total number of groups matching the search criteria"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/tenantGroupSummary"
          }
        }
      },
      "required": [
        "totalCount",
        "data"
      ]
    }
  ],
  "$defs": {
    "baseResponseEnvelope": {
      "type": "object",
      "description": "The common properties of responses",
      "additionalProperties": false,
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the request was successful"
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "An optional message"
        },
        "errors": {
          "type": "array",
          "description": "Any errors that occurred during the request",
          "default": [],
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "success",
        "message",
        "errors"
      ]
    },
    "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",
            "null"
          ],
          "description": "The description of the group"
        },
        "mail": {
          "type": [
            "string",
            "null"
          ],
          "description": "The email address of the group"
        },
        "visibility": {
          "type": [
            "string",
            "null"
          ],
          "description": "The visibility of the group (e.g., Public, Private)"
        },
        "membershipRule": {
          "type": [
            "string",
            "null"
          ],
          "description": "The dynamic membership rule (only populated for groups whose groupTypes contains DynamicMembership)"
        },
        "groupTypes": {
          "type": "array",
          "description": "The types of the group",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "id",
        "displayName",
        "groupTypes"
      ]
    }
  }
}