{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ad/json-schema/azure-ad-microsoft-graph-company-subscription-schema.json",
  "title": "microsoft.graph.companySubscription",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ad-directory-companysubscription-api-openapi.yml#/components/schemas/microsoft.graph.companySubscription",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "companySubscription",
      "type": "object",
      "properties": {
        "commerceSubscriptionId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ID of this subscription in the commerce system. Alternate key."
        },
        "createdDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": [
            "string",
            "null"
          ],
          "description": "The date and time when this subscription was created. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.",
          "format": "date-time"
        },
        "isTrial": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the subscription is a free trial or purchased."
        },
        "nextLifecycleDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": [
            "string",
            "null"
          ],
          "description": "The date and time when the subscription will move to the next state (as defined by the status property) if not renewed by the tenant. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.",
          "format": "date-time"
        },
        "ownerId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The object ID of the account admin."
        },
        "ownerTenantId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier for the Microsoft partner tenant that created the subscription on a customer tenant."
        },
        "ownerType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Indicates the entity that ownerId belongs to, for example, 'User'."
        },
        "serviceStatus": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.servicePlanInfo"
          },
          "description": "The provisioning status of each service included in this subscription."
        },
        "skuId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The object ID of the SKU associated with this subscription."
        },
        "skuPartNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "The SKU associated with this subscription."
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "description": "The status of this subscription. The possible values are: Enabled, Deleted, Suspended, Warning, LockedOut."
        },
        "totalLicenses": {
          "maximum": 2147483647,
          "minimum": -2147483648,
          "type": [
            "number",
            "null"
          ],
          "description": "The number of licenses included in this subscription.",
          "format": "int32"
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    }
  ],
  "$defs": {
    "microsoft.graph.entity": {
      "title": "entity",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    },
    "microsoft.graph.servicePlanInfo": {
      "title": "servicePlanInfo",
      "type": "object",
      "properties": {
        "appliesTo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The object the service plan can be assigned to. The possible values are:User - service plan can be assigned to individual users.Company - service plan can be assigned to the entire tenant."
        },
        "provisioningStatus": {
          "type": [
            "string",
            "null"
          ],
          "description": "The provisioning status of the service plan. The possible values are:Success - Service is fully provisioned.Disabled - Service is disabled.Error - The service plan isn't provisioned and is in an error state.PendingInput - The service isn't provisioned and is awaiting service confirmation.PendingActivation - The service is provisioned but requires explicit activation by an administrator (for example, Intune_O365 service plan)PendingProvisioning - Microsoft has added a new service to the product SKU and it isn't activated in the tenant."
        },
        "servicePlanId": {
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier of the service plan.",
          "format": "uuid"
        },
        "servicePlanName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the service plan."
        }
      },
      "additionalProperties": {
        "type": "object"
      }
    }
  }
}