Overview

During the sync process the Microsoft platform may return and error condition. If this occurs the Sync Now button will show Sync Failure and display in red.


TABLE OF CONTENTS

  • Applies To
  • Overview
  • Setup partially complete, domains not ready in Office 365
  • Invalid Client Error
  • Incorrect Tenant
  • Setup Partially Complete - Cannot Find Specified Gateway
  • Setup Partially Complete - Domains Waiting Activation
  • Cannot find specified Online PSTN usage/PSTN Usage not ready yet.
  • Other Sync Errors



Setup partially complete, domains not ready in Office 365


If the Sync process times-out past the 15 minute countdown and returns with a red-text error "Setup partially complete, domains not ready in Office 365" for 2 or one domains:


Then this means that Microsoft have not 'voice activated' the domains.


Note: This has no connection to the Microsoft Admin Center stating the domains "Not Connected to Service", (this status can be ignored in the admin center).


The action is to allow additional time for the domains to activate, the service has left these domains in a state to be activated as soon as Microsoft can perform this action.


Solution 1

Resolve this issue by waiting for some time, and regularly re-running the Sync Now process to check the activation status of the domains. This can sometimes take several hours.


Solution 2

If after several hours the error persists, then the recommended action is to re-initialise the Teams service with new domains for Microsoft to activate (this will also reset the clock, so not a guaranteed instant fix).


Re-initialise the Teams service by:


  • Delete the Teams service (trash icon)
  • Click 'Enable Sync' again.





Invalid Client Error

If in the pop-up "Acquiring Microsoft Access Token - invalid_client " is seen, then this indicates that the Microsoft Office 365 tenant is not fully setup, or the setup has failed.


Resolve this issue by running the Setup Wizard which will repair this state in the Microsoft 365 tenant.




Incorrect Tenant

This can occur if you use the PBX Sync feature to synchronise your users with your PBX rather than adding them manually through the Add User button.


The first time the account sync is run, we store the customer id. After that we ensure all future changes are made to the correct customers by checking the ID against the administrator's login.


How to resolve.

In the PBX configuration page, disable PBX sync, then save.

Next, Re-enable PBX sync and run  PBX Sync from the Sync Now drop down

Now save the PBX configuration again.



Setup Partially Complete - Cannot Find Specified Gateway

If you see this error message: Setup partially complete, sync again in 2 minutes seconds. Office 365 is not ready, then review the Sync Log for more details. The most common reason for this message is that the setup process cannot find specified Gateway and this message will show in the log.


If this is the case then the platform can see the domain and is voice activated, but the PSTN gateway is not yet visible when setting the voice routes, The system will normally sleep 2.5 mins before checking again which normally proves to be successful.The primary cause is that the change is not propagating readily through the Microsoft infrastructure. This situation happens from time to time and may take a few hours to complete. Unfortunately we have no control over the Microsoft Network. Please come back later and click the Sync Now button again. If this error is not resolved within 24 hours, the issue may need to be escalated to Microsoft.


If you've waited 24 hours, and it's still not fixed


NOTE: We have seen some customers having to wait up to 5 days for Microsoft to activate the domain. This is an entirely unsatisfactory situation but we are powerless to influence this.


This is a delay on Microsoft's side, but as it's been more than 24 hours  you should log it with the support service of Microsoft 365. Below we've prescribed some text to send if that helps:

  • To do this,log in to the Microsoft 365 admin portal at https://www.office.com/ 
  • Go to the Admin icon
  • On the left hand side menu bar select "Show All" and the Support option will show,
  • Create a support request  


Subject: ‎Issue using Skype for Business Powershell to set up Teams Direct Routing. Error: Cannot find specified Gateway 


This is the information they will need to log: 
  • This is an issue using Skype for Business Powershell to set up Teams Direct Routing. 
  • The environment is multi-tenant, so the PSTN Gateways are defined on the carrier tenant and not in the customer tenant. 
  • The PSTN Gateways listed below are domains on the customer tenant that have been validated and appear in the 'DomainUrlMap' property of 'Get-CsTenant'.  

The command that is failing is: 

New-CsOnlineVoiceRoute -Name "-USE0" -OnlinePstnGatewayList xxxxxxxxxxxx.XXXXXXXX.com -OnlinePstnUsages-USE -Priority "0" -NumberPattern ".*"
 Error: 
Cannot find specified Gateway "xxxxxxxxxxxx.XXXXXXXX.com"
(You will need to substitute the xxxxxxxxxxxx.XXXXXXXX fields with the specific text from your sync log)

Setup Partially Complete - Domains Waiting Activation

This is usually a waiting game. Unfortunately we have no control over how long it takes Microsoft to complete their part of the configuration process and in some extremely rare cases, it can take days. You always have the option of contacting Microsoft Support to query this or you can try removing the domains from the MS tenant and starting the Sync process over.

Please perform the following:
  • Delete the Teams service and any user in the tenant called "Temporary Domain Voice Activation User"
  • Delete the Teams service (trash icon)
  • Click 'Enable Sync' again.

This will create new domains that may not have the Microsoft delay issue.



Cannot find specified Online PSTN usage/PSTN Usage not ready yet.

To get more information, view the most recent Sync history from the drop down on the Sync Now button:


View the recent Sync log using the chevron in the left column


If you experience a Sync Now failure and the log has the following type of error:


Cannot find specified Online PSTN usage "Servicename-xxx".

Then this indicates the Microsoft 365 tenant has not properly.


Solution 1

The first action is to wait and re-try the Sync Now process periodically for a few hours.


Solution 2

If after several hours the not issue is not resolved then we recommend immediate escalation to Microsoft.  


To do this,log in to the Office 365 admin portal at https://www.office.com/ 

Go to the Admin icon

On the left hand side menu bar select "Show All" and the Support option will show,

Create a support request entitled something like "Direct Routing:Cannot find specified Online PSTN usage  "

Within the detail of the support request, provide the following details:


- The tenant is being configured for Direct Routing

- The domains are activated for voice on the tenant

- The command Get-CsOnlinePstnUsage -Identity "Global" confirms the PSTN Usage setting exist


 -The command New-CsOnlineVoiceRoute produces an error:


 -"Cannot find specified Online PSTN usage" when trying to use the domain.


Solution 3

You may wish to consider removing the Teams service from the portal, removing the 2 domains created in the MS 365 tenant and then re-enabling the Teams service.

This will start the Sync process afresh, creating new domains.

However, please be warned, this process is service affecting and will be subject to any configuration delays outside of our control.

  • Delete the Teams service (trash icon)
  • Click 'Enable Sync' again.


Getting more information (advanced)


If Microsoft require you to reproduce the error in PowerShell or if you need to prove conclusively to your support organisation that that this is the issue then:


1) Set up you computer to run Teams PowerShell following this guidance Teams Admin PowerShell and log in to your tenant as Global Administrator


2) Run the command:
Get-CsOnlinePstnUsage -Identity Global 
to provide a list of the recorded PSTN usages that are setup


3) Locate the command in the sync log that starts with
New-CsOnlineVoiceRoute -Name 
and immediately precedes the error message. 


for example, the command will resemble this: 

New-CsOnlineVoiceRoute -Name "Branddomain-xxxx" -OnlinePstnGatewayList @('5lesvgit4j3o.AUSEA02.branddomain.com') -OnlinePstnUsages @('branddomain-USE') -Priority "0" -NumberPattern ".*" 

Copy this command into the PowerShell session and you will receive the error to confirm the Microsoft 365 tenant setup is at fault. 


Cut/Paste the PowerShell transcript and send to Microsoft and/or your support organisation,


Note: We have reports from customers that this issue may resolve of its own accord but the delay reported is up to 11 days.



Other Sync Errors

For Sync failures, review the log and the following error conditions and their possible causes.


MessageLikely cause
Management object not found for identity
That typically occurs if the users have only recently been given licences in Office 365 and Microsoft is still setting them up behind the scenes. In the Office 365 admin portal they currently advise this can take 24 hours and have a link to click to see the Teams provisioning status of users.

Wait and try again later.
Cannot modify the parameter: "EnterpriseVoiceEnabled" because it is restricted for the user service plan: MCOProfessional

This means the Sync process sees the user has a Phone System licence in one of Microsoft's systems, but this has not been propagated to the Microsoft subsystem responsible for voice yet. "MCOEV" is the Phone System plan, and if this is not listed in the error message then the Skype for Business PowerShell server does not see it yet.

Wait and try again later.

Cannot find specified Online PSTN usage "-XXX".

 

This message can occur when the tenant is setup and there are no licences users to sync with the phone system. Licence some users and re-try.
The issue also can be caused by the Microsoft platform not being updated in time for the check, in this case wait and try again later. See Contents.
PSERROR> Failed to start remote PowerShell -or-
Unexpected PS Runspace is null
Most likely cause is not being logged in as Global Admin when running sync.. Look into the logs further for messages like "No cmdlets have been authorized for use by the RBAC role that the user belongs to" to confirm this.

Also at the top of the log the admin role will be detailed. If this reads something like "Connected as 'tom@greenbackhealth.com' with roles: User Account Administrator" then this is clear that the logged-in user is not Company Administrator, which is the required role.
Domain takeover failed

The admin first logged in with the wrong global admin account (from another M365 tenant) and the Sync Now feature has created the same dns in the two different tenants.


Either Delete the Teams service (trash can icon in Teams tab) and create new domains or remove the dns from the wrong Microsoft tenant and then the sync will work

The term 'Set-CsUser' is not recognized as the name of a cmdlet, function, script file, or operable program.Most likely cause is not being logged in as Global Admin when running sync..

Look into the logs, the admin role will be detailed near the top. If this reads something like "Connected as 'tom@greenbackhealth.com' with roles: User Account Administrator" then this is clear that the logged-in user is not Company Administrator, which is the required role, In the Microsoft 365 admin center, ensure the 'Global Admin' role is assigned to the user running the sync.
Cannot modify the parameter: "EnterpriseVoiceEnabled" because it is restricted for the user service plan: MCOEV_VIRTUALUSER,MCOProfessionalA Virtual Phone System licence is applied to a real user and the service cannot be configured.. Virtual Phone System licences can only be used on Auto Attendants (AAs) and Call Queues.

Purchase or obtain trial licenses for a valid type to apply to the user (see relevant KB article for guidance on MS Licencing)
The term 'Get-CsMeetingRoom' is not recognized as the name of a cmdlet,Most likely cause is not being logged in as Global Admin when running sync..

Look into the logs, the admin role will be detailed near the top. If this reads something like "Connected as 'tom@greenbackhealth.com' with roles: User Account Administrator" then this is clear that the logged-in user is not Company Administrator, which is the required role, In the Microsoft 365 admin center, ensure the 'Global Admin' role is assigned to the user running the sync.
Cannot modify the parameter: "OnPremLineURI" because it is restricted for the user service plan: .This error occurs in two scenarios:
1) A number is being applied to a user who is recently licenced and Microsoft have not yet updated the user database to acknowledge phone system capability.
2) The number is being moved from one user with the licence recently removed, to a new user. Microsoft produce this error as the act of removing a number from an unlicensed user is not needed.

In either case the issue is minor and is resolved by waiting a short time and running the Sync process again.
Failed To Validate Domain
Microsoft may be taking longer than usual to configure the domains we need setting up.
Subsequent revisits to the Sync button in the portal should eventually resolve this but we have noted that on rare occasions, Microsoft can take several days.
If you feel you have been waiting excessively long, you can always ask Microsoft for support, quoting the relevant lines from the sync log. See the section: Setup Partially Complete - Domains Waiting Activation
Cannot modify the parameter: "OnPremLineURI" because it is restricted for the user service plan: MCOEV,MCOPSTN2,MCOMEETADD,MCOProfessional.The user has a Calling Plan applied and will not be configured for calling via the service.  The element MCOPSTNX is the calling plan licence.
Normally this user would be excluded by the Sync Now function except if the customer is using Large Tenant Mode where licences are not checked.
An error occurred while creating the pipelineThe usual reason for this is because the Teams Service Connector is out of date. if you can see the upgrade Teams Connector button on the Teams Services tab, you should consider upgrading.