Subscription - Create Subscription

The operation to create a new WebDirect or EA Azure subscription.

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Subscription/createSubscription?api-version=2020-01-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.

billingProfileName
path True

string

The name of the billing profile in the billing account for which you want to create the subscription.

invoiceSectionName
path True

string

The name of the invoice section in the billing account for which you want to create the subscription.

api-version
query True

string

Version of the API to be used with the client request. Current version is 2020-01-01

Request Body

Name Type Description
costCenter

string

If set, the cost center will show up on the Azure usage and charges file.

displayName

string

The friendly name of the subscription.

managementGroupId

string

The identifier of the management group to which this subscription will be associated.

owner

AdPrincipal

If specified, the AD principal will get owner access to the subscription, along with the user who is performing the create subscription operation

skuId

string

The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.

Responses

Name Type Description
200 OK

SubscriptionCreationResult

Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.

202 Accepted

Accepted. Subscription creation is in progress.

Headers

  • Location: string
  • Retry-After: integer
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

createSubscription

Sample Request

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/0aa27f2b-ec7f-5a65-71f6-a5ff0897bd55:ae0dae1e-de9a-41f6-8257-76b055d98372_2019-05-31/billingProfiles/27VR-HDWX-BG7-TGB/invoiceSections/JGF7-NSBG-PJA-TGB/providers/Microsoft.Subscription/createSubscription?api-version=2020-01-01

{
  "displayName": "Contoso MCA subscription",
  "skuId": "0001",
  "costCenter": "135366376",
  "owner": {
    "objectId": "973034ff-acb7-409c-b731-e789672c7b32"
  }
}

Sample Response

Location: https://management.azure.com/providers/Microsoft.Subscription/subscriptionOperations/ODdmYTU0MDktODc5YS00ZTEzLTg2MWItNTQ4ZjYxNzBlOTQw?api-version=2020-01-01
Retry-After: 8
{
  "subscriptionLink": "/subscriptions/d0d6ee57-6530-4fca-93a6-b755a070be35"
}

Definitions

Name Description
AdPrincipal

Active Directory Principal who’ll get owner access on the new subscription.

ErrorResponse

Describes the format of Error response.

ModernSubscriptionCreationParameters

The parameters required to create a new subscription.

SubscriptionCreationResult

The created subscription object.

AdPrincipal

Active Directory Principal who’ll get owner access on the new subscription.

Name Type Description
objectId

string

Object id of the Principal

ErrorResponse

Describes the format of Error response.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

ModernSubscriptionCreationParameters

The parameters required to create a new subscription.

Name Type Description
costCenter

string

If set, the cost center will show up on the Azure usage and charges file.

displayName

string

The friendly name of the subscription.

managementGroupId

string

The identifier of the management group to which this subscription will be associated.

owner

AdPrincipal

If specified, the AD principal will get owner access to the subscription, along with the user who is performing the create subscription operation

skuId

string

The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.

SubscriptionCreationResult

The created subscription object.

Name Type Description
subscriptionLink

string

The link to the new subscription. Use this link to check the status of subscription creation operation.