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.



If an error is shown preventing the first sync with the message 'Invalid_Client' then review this article:

'Invalid Client' error in popup window when trying first sync



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 find specified Gateway
Office 365 is not ready,
Review this article:
https://connectorsupport.freshdesk.com/support/solutions/articles/80000074992-setup-partially-complete-message-during-initial-sync-

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 "servicename-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.
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.

 

Remove our 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,MCOProfessional
A 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.