Billing Subscriptions - Get

Gets a subscription by its ID. The operation is currently supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement and Microsoft Online Services Program.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}?api-version=2021-10-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

billingSubscriptionName
path True

string

The ID that uniquely identifies a subscription.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2021-10-01.

Responses

Name Type Description
200 OK

BillingSubscription

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

BillingSubscription

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07?api-version=2021-10-01

Sample Response

{
  "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07",
  "name": "418b0e9c-5dc3-4260-918f-30b90619fe07",
  "type": "Microsoft.Billing/billingAccounts/billingSubscriptions",
  "properties": {
    "autoRenew": "Off",
    "billingFrequency": "P1M",
    "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664",
    "billingProfileDisplayName": "Contoso operations billing profile",
    "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664",
    "displayName": "Subscription 1",
    "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073",
    "invoiceSectionDisplayName": "Contoso operations invoice section",
    "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073",
    "lastMonthCharges": {
      "currency": "USD",
      "value": 5000
    },
    "monthToDateCharges": {
      "currency": "USD",
      "value": 600
    },
    "productCategory": "UsageBased",
    "productType": "Usage based",
    "productTypeId": "DZH318Z0BPS6",
    "purchaseDate": "2021-10-01T00:00:00Z",
    "quantity": 1,
    "skuId": "0001",
    "skuDescription": "Microsoft Azure Plan",
    "status": "Active",
    "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3"
  }
}

Definitions

Name Description
Amount

The amount.

AutoRenew

Indicates whether auto renewal is turned on or off for a subscription.

BillingSubscription

A billing subscription.

BillingSubscriptionStatus

The status of the subscription. This field is not available for Enterprise Agreement billing accounts.

ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

ErrorSubDetails

The sub details of the error.

NextBillingCycleDetails

The next billing cycle details of the subscription.

RenewalTermDetails

The term details of the subscription at renewal.

Reseller

Details of the reseller.

SubscriptionEnrollmentAccountStatus

The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement billing accounts.

Amount

The amount.

Name Type Description
currency

string

The currency for the amount value.

value

number

Amount value.

AutoRenew

Indicates whether auto renewal is turned on or off for a subscription.

Name Type Description
Off

string

On

string

BillingSubscription

A billing subscription.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.autoRenew

AutoRenew

Indicates whether auto renewal is turned on or off for a subscription.

properties.beneficiaryTenantId

string

The provisioning tenant of the subscription.

properties.billingFrequency

string

The billing frequency of the subscription in the ISO8601 format. Example: P1M, P3M, P1Y

properties.billingPolicies

object

Dictionary of billing policies associated with the subscription.

properties.billingProfileDisplayName

string

The display name of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.

properties.billingProfileId

string

The ID of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.

properties.billingProfileName

string

The name of the billing profile to which the subscription is billed. This field is only applicable for Microsoft Customer Agreement billing accounts.

properties.consumptionCostCenter

string

The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement Type billing accounts.

properties.customerDisplayName

string

The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts.

properties.customerId

string

The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts.

properties.customerName

string

The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing accounts.

properties.displayName

string

The name of the subscription.

properties.enrollmentAccountDisplayName

string

The enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement billing accounts.

properties.enrollmentAccountId

string

The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement billing accounts.

properties.enrollmentAccountSubscriptionDetails.enrollmentAccountStartDate

string

The enrollment Account and the subscription association start date. This field is available only for the Enterprise Agreement billing accounts.

properties.enrollmentAccountSubscriptionDetails.subscriptionEnrollmentAccountStatus

SubscriptionEnrollmentAccountStatus

The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement billing accounts.

properties.invoiceSectionDisplayName

string

The display name of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.

properties.invoiceSectionId

string

The ID of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.

properties.invoiceSectionName

string

The name of the invoice section to which the subscription is billed. The field is applicable only for Microsoft Partner Agreement billing accounts.

properties.lastMonthCharges

Amount

The last month's charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts.

properties.monthToDateCharges

Amount

The current month to date charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts.

properties.nextBillingCycleDetails

NextBillingCycleDetails

Next billing cycle details of the subscription.

properties.offerId

string

The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts.

properties.productCategory

string

The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other

properties.productType

string

The type of the product for which the subscription is purchased

properties.productTypeId

string

The ID of the product for which the subscription is purchased

properties.purchaseDate

string

The purchase date of the subscription in UTC time.

properties.quantity

integer

The number of licenses purchased for the subscription

properties.renewalTermDetails

RenewalTermDetails

The term details of the subscription at the next renewal.

properties.reseller

Reseller

The reseller for which the subscription is created. The field is available for Microsoft Partner Agreement billing accounts.

properties.skuDescription

string

The SKU description of the product for which the subscription is purchased. This field is only available for Microsoft Customer Agreement billing accounts.

properties.skuId

string

The SKU ID of the product for which the subscription is purchased. This field is only available for Microsoft Customer Agreement billing accounts.

properties.status

BillingSubscriptionStatus

The status of the subscription. This field is not available for Enterprise Agreement billing accounts.

properties.subscriptionId

string

The ID of the usage-based subscription. This field is only available for usage-based subscriptions of Microsoft Customer Agreement billing accounts.

properties.suspensionReasons

string[]

The suspension reason for the subscription. This field is not available for Enterprise Agreement billing accounts.

properties.termDuration

string

The duration for which you can use the subscription. Example P1Y and P1M

properties.termEndDate

string

The end date of the term in UTC time.

properties.termStartDate

string

The start date of the term in UTC time.

type

string

Resource type.

BillingSubscriptionStatus

The status of the subscription. This field is not available for Enterprise Agreement billing accounts.

Name Type Description
Active

string

AutoRenew

string

Cancelled

string

Deleted

string

Disabled

string

Expired

string

Expiring

string

Suspended

string

Unknown

string

Warned

string

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

The sub details of the error.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetails

The details of the error.

ErrorSubDetails

The sub details of the error.

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

NextBillingCycleDetails

The next billing cycle details of the subscription.

Name Type Description
billingFrequency

string

The billing frequency of the subscription in the next billing cycle.

RenewalTermDetails

The term details of the subscription at renewal.

Name Type Description
billingFrequency

string

The billing frequency of the subscription.

productTypeId

string

The ID of the product.

quantity

integer

The number of licenses

skuId

string

The SKU ID of the product

termDuration

string

The term duration of the subscription. Example P1M and P1Y

Reseller

Details of the reseller.

Name Type Description
description

string

The name of the reseller.

resellerId

string

The MPN ID of the reseller.

SubscriptionEnrollmentAccountStatus

The current enrollment account status of the subscription. This field is available only for the Enterprise Agreement billing accounts.

Name Type Description
Active

string

Cancelled

string

Deleted

string

Expired

string

TransferredOut

string

Transferring

string