subscriptions
Creates, updates, deletes, gets or lists a subscriptions resource.
Overview
| Name | subscriptions |
| Type | Resource |
| Id | entra_id.directory.subscriptions |
Fields
The following fields are returned by SELECT queries:
- get
- get_2
- list
Retrieved navigation property
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
commerceSubscriptionId | string | The ID of this subscription in the commerce system. Alternate key. |
createdDateTime | string (date-time) | 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. (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])$) |
isTrial | boolean | Whether the subscription is a free trial or purchased. |
nextLifecycleDateTime | string (date-time) | 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. (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])$) |
ownerId | string | The object ID of the account admin. |
ownerTenantId | string | The unique identifier for the Microsoft partner tenant that created the subscription on a customer tenant. |
ownerType | string | Indicates the entity that ownerId belongs to, for example, 'User'. |
serviceStatus | array | The provisioning status of each service included in this subscription. |
skuId | string | The object ID of the SKU associated with this subscription. |
skuPartNumber | string | The SKU associated with this subscription. |
status | string | The status of this subscription. The possible values are: Enabled, Deleted, Suspended, Warning, LockedOut. |
totalLicenses | number (int32) | The number of licenses included in this subscription. |
Retrieved navigation property
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
commerceSubscriptionId | string | The ID of this subscription in the commerce system. Alternate key. |
createdDateTime | string (date-time) | 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. (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])$) |
isTrial | boolean | Whether the subscription is a free trial or purchased. |
nextLifecycleDateTime | string (date-time) | 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. (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])$) |
ownerId | string | The object ID of the account admin. |
ownerTenantId | string | The unique identifier for the Microsoft partner tenant that created the subscription on a customer tenant. |
ownerType | string | Indicates the entity that ownerId belongs to, for example, 'User'. |
serviceStatus | array | The provisioning status of each service included in this subscription. |
skuId | string | The object ID of the SKU associated with this subscription. |
skuPartNumber | string | The SKU associated with this subscription. |
status | string | The status of this subscription. The possible values are: Enabled, Deleted, Suspended, Warning, LockedOut. |
totalLicenses | number (int32) | The number of licenses included in this subscription. |
Retrieved collection
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
commerceSubscriptionId | string | The ID of this subscription in the commerce system. Alternate key. |
createdDateTime | string (date-time) | 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. (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])$) |
isTrial | boolean | Whether the subscription is a free trial or purchased. |
nextLifecycleDateTime | string (date-time) | 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. (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])$) |
ownerId | string | The object ID of the account admin. |
ownerTenantId | string | The unique identifier for the Microsoft partner tenant that created the subscription on a customer tenant. |
ownerType | string | Indicates the entity that ownerId belongs to, for example, 'User'. |
serviceStatus | array | The provisioning status of each service included in this subscription. |
skuId | string | The object ID of the SKU associated with this subscription. |
skuPartNumber | string | The SKU associated with this subscription. |
status | string | The status of this subscription. The possible values are: Enabled, Deleted, Suspended, Warning, LockedOut. |
totalLicenses | number (int32) | The number of licenses included in this subscription. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | commerce_subscription_id | Get a specific commercial subscription that an organization acquired. | |
get_2 | select | company_subscription_id | Get a specific commercial subscription that an organization acquired. | |
list | select | Get the list of commercial subscriptions that an organization acquired. | ||
insert | insert | |||
update | update | commerce_subscription_id | ||
update_2 | update | company_subscription_id | ||
delete | delete | commerce_subscription_id | If-Match | |
delete_2 | delete | company_subscription_id | If-Match |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
commerce_subscription_id | string | Alternate key of companySubscription |
company_subscription_id | string | The unique identifier of companySubscription |
If-Match | string | ETag |
SELECT examples
- get
- get_2
- list
Get a specific commercial subscription that an organization acquired.
SELECT
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses
FROM entra_id.directory.subscriptions
WHERE commerce_subscription_id = '{{ commerce_subscription_id }}' -- required
;
Get a specific commercial subscription that an organization acquired.
SELECT
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses
FROM entra_id.directory.subscriptions
WHERE company_subscription_id = '{{ company_subscription_id }}' -- required
;
Get the list of commercial subscriptions that an organization acquired.
SELECT
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses
FROM entra_id.directory.subscriptions
;
INSERT examples
- insert
- Manifest
No description available.
INSERT INTO entra_id.directory.subscriptions (
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses
)
SELECT
'{{ id }}',
'{{ commerceSubscriptionId }}',
'{{ createdDateTime }}',
{{ isTrial }},
'{{ nextLifecycleDateTime }}',
'{{ ownerId }}',
'{{ ownerTenantId }}',
'{{ ownerType }}',
'{{ serviceStatus }}',
'{{ skuId }}',
'{{ skuPartNumber }}',
'{{ status }}',
{{ totalLicenses }}
RETURNING
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: id
value: "{{ id }}"
description: |
The unique identifier for an entity. Read-only.
- name: commerceSubscriptionId
value: "{{ commerceSubscriptionId }}"
description: |
The ID of this subscription in the commerce system. Alternate key.
- name: createdDateTime
value: "{{ createdDateTime }}"
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.
- name: isTrial
value: {{ isTrial }}
description: |
Whether the subscription is a free trial or purchased.
- name: nextLifecycleDateTime
value: "{{ nextLifecycleDateTime }}"
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.
- name: ownerId
value: "{{ ownerId }}"
description: |
The object ID of the account admin.
- name: ownerTenantId
value: "{{ ownerTenantId }}"
description: |
The unique identifier for the Microsoft partner tenant that created the subscription on a customer tenant.
- name: ownerType
value: "{{ ownerType }}"
description: |
Indicates the entity that ownerId belongs to, for example, 'User'.
- name: serviceStatus
description: |
The provisioning status of each service included in this subscription.
value:
- appliesTo: "{{ appliesTo }}"
provisioningStatus: "{{ provisioningStatus }}"
servicePlanId: "{{ servicePlanId }}"
servicePlanName: "{{ servicePlanName }}"
- name: skuId
value: "{{ skuId }}"
description: |
The object ID of the SKU associated with this subscription.
- name: skuPartNumber
value: "{{ skuPartNumber }}"
description: |
The SKU associated with this subscription.
- name: status
value: "{{ status }}"
description: |
The status of this subscription. The possible values are: Enabled, Deleted, Suspended, Warning, LockedOut.
- name: totalLicenses
value: {{ totalLicenses }}
description: |
The number of licenses included in this subscription.
UPDATE examples
- update
- update_2
No description available.
UPDATE entra_id.directory.subscriptions
SET
id = '{{ id }}',
commerceSubscriptionId = '{{ commerceSubscriptionId }}',
createdDateTime = '{{ createdDateTime }}',
isTrial = {{ isTrial }},
nextLifecycleDateTime = '{{ nextLifecycleDateTime }}',
ownerId = '{{ ownerId }}',
ownerTenantId = '{{ ownerTenantId }}',
ownerType = '{{ ownerType }}',
serviceStatus = '{{ serviceStatus }}',
skuId = '{{ skuId }}',
skuPartNumber = '{{ skuPartNumber }}',
status = '{{ status }}',
totalLicenses = {{ totalLicenses }}
WHERE
commerce_subscription_id = '{{ commerce_subscription_id }}' --required
RETURNING
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses;
No description available.
UPDATE entra_id.directory.subscriptions
SET
id = '{{ id }}',
commerceSubscriptionId = '{{ commerceSubscriptionId }}',
createdDateTime = '{{ createdDateTime }}',
isTrial = {{ isTrial }},
nextLifecycleDateTime = '{{ nextLifecycleDateTime }}',
ownerId = '{{ ownerId }}',
ownerTenantId = '{{ ownerTenantId }}',
ownerType = '{{ ownerType }}',
serviceStatus = '{{ serviceStatus }}',
skuId = '{{ skuId }}',
skuPartNumber = '{{ skuPartNumber }}',
status = '{{ status }}',
totalLicenses = {{ totalLicenses }}
WHERE
company_subscription_id = '{{ company_subscription_id }}' --required
RETURNING
id,
commerceSubscriptionId,
createdDateTime,
isTrial,
nextLifecycleDateTime,
ownerId,
ownerTenantId,
ownerType,
serviceStatus,
skuId,
skuPartNumber,
status,
totalLicenses;
DELETE examples
- delete
- delete_2
No description available.
DELETE FROM entra_id.directory.subscriptions
WHERE commerce_subscription_id = '{{ commerce_subscription_id }}' --required
AND If-Match = '{{ If-Match }}'
;
No description available.
DELETE FROM entra_id.directory.subscriptions
WHERE company_subscription_id = '{{ company_subscription_id }}' --required
AND If-Match = '{{ If-Match }}'
;