Symptoms
Sales order for Microsoft 365 subscription fails with the following error:
The last error - "Service Creation Failed: Platform error #error_code #-1, extype_id #-1, module_id #, '500 Internal Server Error' received from 'POST https://o365aeh.contoso.eu/O365App/aps/tenants': Value cannot be null. Parameter name: resourceId.
Cause
Resource type misconfiguration. License or addon resource type is configured as Application Service instead of Application Service Reference.
Resolution
Cancel sales order, remove incorrect resource type from the platform (both from Billing and Operations side) and create a new resource following steps from our documentation.