Symptoms
Office 365 APS1.2 subscription upgrade to APS 2.0 fails with the error:
Subscription #111001: Unable to find domain example.onmicrosoft.com in account #1051234
Cause
There are too many hosted domains (over 1000) on the account. The script retrieves domains with the following query:
GET https://192.168.1.10:6308//aps/2/resources?implementing(http%3A%2F%2Faps-standard.org%2Ftypes%2Fdns%2Fzone)
but default limit for REST queries to APS bus is 1000.
Resolution
- Edit the script
upgradeAPS1ToAPS2.py
Find the line #309 (inside the function
reregisterDomains
):path = "/aps/2/resources?implementing(%s)" % dnsZoneType
Modify it as below:
path = "/aps/2/resources?implementing(%s),limit(0,3000)" % dnsZoneType
(set the limit value higher than number of domains on the account)
- Save the file and re-run the script.