Creating a Microsoft 365 Subscription for a Registered Microsoft Account
This section describes how to create a Microsoft 365 subscription for a registered Microsoft account of a customer account.
To create a Microsoft 365 subscription for a registered Microsoft account of a customer account, create a sales order as described in the Platform SDK Guide. When creating this order, do not pass any application-specific information in the parameters array.
After creating this sales order, the following events happen:
- In your system, a Microsoft 365 subscription is created for the customer account. This Microsoft 365 subscription is bound to the Microsoft account.
- In the Microsoft cloud, one or more cloud subscriptions are created for the Microsoft account, depending on the resources and limits of the Microsoft 365 subscription.
Important: Creating orders is a custom operation. The user whose key and secret you use to access the APS REST API must have http://www.odin.com/billing/order-management and POST in its list of allowed operations.
Example
HTTP Request
POST https://example.com/aps/2/services/order-manager/orders
{
"type": "SALES",
"accountId": "0b0daf96-5f45-406b-a664-e7401ea75fd4",
"paymentMethodId": "0",
"products": [
{
"planId": "dd93d155-cfaf-4418-b0e7-abdb819f9858",
"period": {
"unit": "YEARS",
"duration": 1
},
"resources": [
{
"resourceId": "d60766de-3857-4a27-a65e-dad9d346b42d",
"amount": 2
}
],
"parameters": []
}
]
}
HTTP Response
{
"orderId": "329288d1-9814-4444-ad90-ceb3d83694cd",
"paymentCreationResult": {
"paymentId": 3
}
}