Symptoms

An Office 365 task fails in POA with the following error message:

Method edit_user calling failed. Reason:InvalidAssignmentFault Method: SetUserSubscriptions..."

See the example below:

Task name        APS application 'Microsoft Office 365', id 274, instance 520 -> service 'user', instance 3296: executing configuration script
Last execution output    Application configuration script reported errors: '

Method edit_user calling failed. Reason:InvalidAssignmentFault Method: SetUserSubscriptions ({"ExtensionData":null,"AddSubscriptionIds":["18b11451-7a50-4f24-85c6-9f57903a9fc8"],...

Cause

There is an inconsistency between the user license assignments in POA and in Microsoft Online Portal (MOP), i.e., the customer has changed the license assignment for the user directly in MOP.

Resolution

Solution 1

  1. Log in to MOP as administrator and select the user for which the POA task has failed.

  2. Assign to the user the license that was assigned to that user in POA before the re-configuration.

  3. Re-start the failed POA task.

Solution 2

The solution should be used only if you want to assign to the user the license which is actually assigned to that user in MOP.

  1. Log in to the POA Provider Control Panel and find the failed task in Task Manager.

  2. Find all task settings, including 'env_var_SETTINGS_offers_NNN' for non-trial subscription and 'env_var_SETTINGS_trial_offer' for trial subscriptions

  3. Log in to Customer CP and go to Microsoft Office365 > Configuration > Settings. Using the data in the section "Support Information," match the offer ID obtained in step 2 with the Microsoft Subscription ID.

  4. In Customer CP, go to Microsoft Office 365 > Services.

  5. Select the required user and write the user GUID.

  6. Go to Office 365 Gateway host via RDP and update the license assignment for the user in the Gateway Database using the SQL queries below:

    select * from us where id = '0498a1f4-a7c1-48bf-80e8-06308b33d737';
    
    0498a1f4-a7c1-48bf-80e8-06308b33d737|
    {"custId":"d328a2d4-18bd-46da-ba0f-cb8fbfebefbd",
    "admin":true,
    "password":"",
    "upn":"test@testpbx003.parallelscloud.com",
    "subscriptions":["5eba3bba-d905-475a-ab0d-7ea9c4c77e69"],
    "info":
    ...
    
    update us set info = replace(info, '"subscriptions":["5eba3bba-d905-475a-ab0d-7ea9c4c77e69"]', '"subscriptions":["18b11451-7a50-4f24-85c6-9f57903a9fc8"]') where id ='0498a1f4-a7c1-48bf-80e8-06308b33d737';
    
  7. Re-start the failed task in POA.

Solution 3

The solution may be applied only for Microsoft Office365 3.1 or above.

  1. Cancel the failed POA task.

  2. Log in to CCP and select the user that caused the task failure.

  3. For this user, set the O365 license that was set previously (before the failed re-configuration).

  4. Run the synchronization script (see the Office 365 Provider's guide for details).

Internal content