Symptoms

Sales Order #YYYY for Microsoft365 plan is failed with an error message 

'500 Internal Server Error' received from 'POST https://192.168.0.300:443/O365App/aps/tenants': The specified values 'domai' and 'c1047544-e903-4d2b-afe0-84600e754a0a' of the properties 'initial_subdomain' and 'ms_account_id' are ambiguous: A customer with id 'c1047544-e903-4d2b-afe0-84600e754a0a' already exists for CloudBlue Commerce account #10223344 (aps.id: '4d8a2998-5ea4-f958-bce9-65fdbd0e05ff') with a different value of 'initial_subdomain' ('domain'). A new tenant APS resource cannot be created for a subscription with such properties.


Case#1

Task "Provisioning "Tenant" for APS application Microsoft 365" failed with "properties 'initial_subdomain' and 'ms_account_id' are ambiguous". Subscription is not created from the Microsoft side.


Case #2

Subscription was created and active from Microsoft Partner Center and M365 Endpoint.

APS Tenant resource contains incorrect "initial_subdomain" and "bind_to_domain" values

"bind_to_domain": "domai.onmicrosoft.com",
"domain_name": "domain.onmicrosoft.com",
"initial_subdomain": "domai",

but correct domain "domain" name exist from the M365 Endpoint side in Customer table.


Another subscripton for the account was ordered earlier and Sales Order #XXXX for this subscription was failed due to a domain name was incorrect (e.g. "domai" instead of "domain").

Cause

Case #1

Software related issues APSA-23387 and APSA-23370 "M365 Provisioning "Tenant" for APS application Microsoft 365 failed with "properties 'initial_subdomain' and 'ms_account_id' are ambiguous".



Case #2

Software related issue APSA-23708 "The process of onboarding with erroneous data may lead to a non-consistent state of the bus".

First subscription had incorrect domain name and APS Tenant resource was not activated. When second subscription was ordered with correct domain name, Microsoft365 application copied "initial_subdomain" and "bind_to_domain" data from the fisrt subscription APS Tenant Resource and inserted them to a new APS Tenant resource for the second subsription. In parallel, the same "ms_account_id" value was used for the second subscription instead of creating a new one for the correct domain "domain".


Resolution


Case #1

The issue has been fixed in Microsoft 365 application v. 20.3-228.

Please rech out CloudBlue Technical Support team to apply an internal workaround to fix the affected Sales Order and consider the application upgrade.


Case #2

1. Cancel and destroy first failed subscription (Sales Order #XXXX)

2. Cancel and destroy second subscription (Sales Order #YYYY). To do not destroy subscription from Microsoft, reach out CloudBlue Technical Support to apply an internal workaround to disable communication with Microsoft.

3. Reimport second subscription from Microsoft to CloudBlue Commerce.

4. Order a new subscription with the desired Service Plan instead of the first failed subscription (Sales Order #XXXX).


Internal

Internal link