Symptoms
Office365 Provisioning "Tenant" for APS application
task fails:
500 Internal Server Error
[ApplicationUnknownError] Provisioning: resource d.-..-.6 of type 'tenants' (http://www.parallels.com/Office365/Tenant/1.2) for APS application 'Office 365-16.6-43':
Incorrect state name length..
Cause
Error is self-explained: US state
property has incorrect format.
It can be checked additionally in the request body (sitelog or server.log):
DEBUG mmandRequest: Request data: {"customer":..."default_address":{...,"address_line2":"","city":"Doral","region":"Doral","country":"us",...}
There should be "region":"FL" instead of "region":"Doral".
Resolution
Modify customer's contact information and re-run failed task.