{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-administrator-microsoft-entra-schema.json",
  "title": "AdministratorMicrosoftEntra",
  "description": "Server administrator associated to a Microsoft Entra principal.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-administratormicrosoftentras-api-openapi.yml#/components/schemas/AdministratorMicrosoftEntra",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AdministratorMicrosoftEntraProperties",
      "description": "Properties of a server administrator associated to a Microsoft Entra principal.",
      "x-ms-client-flatten": true
    }
  },
  "required": [
    "properties"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "AdministratorMicrosoftEntraProperties": {
      "type": "object",
      "description": "Properties of a server administrator associated to a Microsoft Entra principal.",
      "properties": {
        "principalType": {
          "$ref": "#/$defs/PrincipalType",
          "description": "Type of Microsoft Entra principal to which the server administrator is associated.",
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "principalName": {
          "type": "string",
          "description": "Name of the Microsoft Entra principal.",
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "objectId": {
          "type": "string",
          "description": "Object identifier of the Microsoft Entra principal.",
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "tenantId": {
          "type": "string",
          "description": "Identifier of the tenant in which the Microsoft Entra principal exists.",
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        }
      }
    },
    "PrincipalType": {
      "type": "string",
      "description": "Type of Microsoft Entra principal to which the server administrator is associated.",
      "enum": [
        "Unknown",
        "User",
        "Group",
        "ServicePrincipal"
      ],
      "x-ms-enum": {
        "name": "PrincipalType",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Principal type is not known or not specified."
          },
          {
            "name": "User",
            "value": "User",
            "description": "A Microsoft Entra user."
          },
          {
            "name": "Group",
            "value": "Group",
            "description": "A Microsoft Entra group."
          },
          {
            "name": "ServicePrincipal",
            "value": "ServicePrincipal",
            "description": "A Microsoft Entra service principal, typically representing an application or service identity."
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    }
  }
}