Symptoms
Microsoft365 Collecting Tenant Data procedure fails with the following error:
[root@mn ~]# python readCSPAccounts.py --o365APS2-app-instance-id 16 --vendor-id 1000004
..
"Unable to prepare the import data because of error: The appropriate service plan can not be found."
Cause
There are several possible reasons:
Target Microsoft365
Service Plan
contains more than 1 active subscription period.Target
Service Plan
hasunlimited
value for resource rates. Resource rate max limit should be valid limit.- The resource in the target service plan is not included in any resource category
- The resource rate is not set to be available for sale in-store
- The resource rate for the add-on licenses has non-zero amount for the "inc. amount" and "min. amount" values.
- Show in Store is set to Yes for all MIcrosoft 365 resource rates in the Microsoft365 Service Plan.
Resolution
Use a single subscription period for each Service Plan that is used in the import and make sure resource rates have a valid max limit and correct configuration.
If the license type or resource rate is missing, add the offer according to documentation and restart the readcspaccounts.py
Additionally, a more detailed error for the specific account could always be found in the Microsoft 365 Endpoint log C:\inetpub\wwwroot\Office365Application\App_Data\sitelog
. For example:
2020-08-29 08:52:41,480 <1740> [ 50] DEBUG aps_endpoint: The service plan '100' contains the resource rates [10150, 10151, 10152] with non-zero included amount but the customer tenant does nothave the corresponding cloud subscriptions.