Diagnose connection problems with the Skype for Business Online Connector
Important
Skype for Business Online operated by 21Vianet in China will be retired on October 1, 2023. If you haven't upgraded your Skype for Business Online users yet, they will be automatically scheduled for an assisted upgrade. If you want to upgrade your organization to Teams yourself, we strongly recommend that you begin planning your upgrade path today. Remember that a successful upgrade aligns technical and user readiness, so be sure to leverage our upgrade guidance as you navigate your journey to Teams.
Skype for Business Online, excluding the service operated by 21Vianet in China, was retired on July 31, 2021.
This article provides information that helps you diagnose and resolve problems that can occur when you try to create a remote Microsoft PowerShell session that connects to Skype for Business Online. See the following sections:
Import-Module error caused by Windows PowerShell execution policy
Import-Module Error caused by incorrect version of Windows PowerShell
Modern authentication fails when WinRM Basic authentication has been disabled
Ability to connect to tenant has been disabled in Skype for Business Online
The maximum number of concurrent shells for this user in Skype for Business Online has been exceeded
Import-Module error caused by Windows PowerShell execution policy
The PowerShell execution policy helps to determine which configuration files can be loaded into the PowerShell console, and which scripts a user can run from that console. At a minimum, the Skype for Business Online Connector module can't be imported unless the execution policy has been set to RemoteSigned. If it hasn't, then you'll receive the following error message when you attempt to import the module:
Error: Import-Module: File C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\LyncOnlineConnector\LyncOnlineConnectorStartup.psm1 can't be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.
Resolution To resolve this issue, start PowerShell as an administrator, and then run the following command:
Set-ExecutionPolicy RemoteSigned
For details about execution policy, see About Execution Policies.
Import-Module Error caused by incorrect version of Windows PowerShell
The Skype for Business Online Connector module can be run only under Windows PowerShell 3.0. If you try to import the module under a previous version of PowerShell, the import process fails with an error message similar to this message:
Error: Import-Module: The version of the loaded PowerShell is '2.0'. The module 'D:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\LyncOnlineConnector\LyncOnlineConnector.psd1' requires a minimum PowerShell version of '3.0' to execute. Verify the installation of the PowerShell and try again.
Resolution: The only way to fix this problem is to install Windows PowerShell 3.0, which is available from the Microsoft Download Center at https://www.microsoft.com/download/details.aspx?id=34595.
Modern authentication fails when WinRM Basic authentication has been disabled
The latest version of the Skype for Business Online Connector module uses modern authentication, but the underlying Windows Remote Management (WinRM) client must be configured to allow Basic authentication. Modern authentication uses bearer tokens, which are usually passed in the Authorization: Bearer header. Windows PowerShell, upon which Skype for Business PowerShell is built, doesn't allow for manipulation of this header. Instead, Skype for Business PowerShell uses the Authorization: Basic header to pass the bearer token.
See Download and install Windows PowerShell for instructions on how to enable WinRM for Basic authentication.
Failed to connect to Live ID Server
Warning
Live ID authentication has been deprecated for Skype For Business online Connector. Use the Teams PowerShell Module to manage the online tenant. When managing hybrid environments, upgrade to latest cumulative update or use oAuth authentication.
There are typically three reasons why your connection attempt might fail with the following error message:
Error: Get-CsWebTicket: Failed to connect live ID servers. Make sure proxy is enabled or machine has network connection to live ID servers.
Resolution: Often this error means that the Microsoft Online Services Sign-in Assistant isn't running. You can verify the status of this service by running the following command from the PowerShell prompt:
Get-Service "msoidsvc"
If the service isn't running, start the service by using this command:
Start-Service "msoidsvc"
If the service is running, you might be encountering problems with the network connection between your computer and the Microsoft Live ID Authentication Server. To check this, open Internet Explorer and navigate to https://login.microsoftonline.com/. Try logging on to Microsoft 365 or Office 365 from there. If this fails, you're probably experiencing network connection issues.
Less commonly, it's possible that the Connection URI for Microsoft Live ID Authentication Server has been configured to the wrong value. If you've already determined that the Sign-In Assistant is running and that you aren't experiencing network connectivity issues, this might be the issue. In this case, contact Microsoft Support.
Logon failed for the user
When you attempt to make a remote connection to Skype for Business Online, you must supply the user name and password of a valid Skype for Business Online user account. If you don't, logon will fail along with an error message similar to this message:
Error: Get-CsWebTicket : Logon failed for the user 'kenmyer@litwareinc.com'. Create a new PSCredential object, making sure that you have used the correct user name and password.
Resolution: If you think that you're using a valid user account and that you have the correct password, try logging on again. If that fails, use the same credentials and try to sign in at https://login.microsoftonline.com/. If you're unable to sign in there, contact Microsoft Support.
The user doesn't have permission to manage this tenant
You can't make a remote PowerShell connection toSkype for Business Online unless you're a member of the Tenant Administrators group. If you aren't, your connection attempt will fail, and you'll receive the following error message:
Error: New-PSSession: [admin.vdomain.com] Processing data from remote server admin.vdomain.com failed with the following error message: The user 'user@foo.com' doesn't have permission to manage this tenant. Permissions can be granted by assigning the user to the appropriate RBAC role. For more information, see the Remote Troubleshooting.
Resolution: If you think that you are, or are supposed to be, a member of the Tenant Administrators group, you need to contact Microsoft Support.
Ability to connect to tenant has been disabled in Skype for Business Online
To use PowerShell to manage Skype for Business Online, the EnableRemotePowerShellAccess property of your tenant PowerShell policy must be set to True
. If it isn't, your connection will fail, and you'll receive the following error message:
Error: New-PSSession: [admin.vdomain.com] Processing data from remote server admin.vdomain.com failed with the following error message: The ability to connect to this tenant by using a remote PowerShell session has been disabled. Contact Lync Help to check Tenant PowerShell Policy of this tenant. For more information, see the Remote Troubleshooting.
Resolution: If you see this error message, you need to contact Microsoft Support and get remote PowerShell access enabled.
The maximum number of concurrent shells for this user in Skype for Business Online has been exceeded
Each administrator is allowed a maximum of three simultaneous remote connections to Skype for Business Online. If you have three remote PowerShell connections up and running, any attempt to make a fourth simultaneous connection will fail, with the following error message:
Error: New-PSSession: [admin.vdomain.com] Connecting to remote server admin.vdomain.com failed with the following error message: The WS-Management service can't process the request. The maximum number of concurrent shells for this user has been exceeded. Close existing shells or raise the quota for this user. For more information, see the Remote Troubleshooting.
Resolution: The only way to resolve this issue is to close one or more of the previous connections. When you're finished with a Skype for Business Online session, we recommend that you use the Remove-PSSession cmdlet to terminate the session. This will help you to prevent this issue.
The maximum number of concurrent shells for this tenant in Skype for Business Online has been exceeded
Although each administrator is allowed to have as many as three simultaneous connections to a Skype for Business Online tenant, no single tenant is allowed to have more than 20 simultaneous connections. For example, six administrators might each have three open sessions. If a fourth administrator tries to make more than two connections (resulting in a total of 21 simultaneous connections), this attempt fails, with the following error message:
Error: New-PSSession: [admin.vdomain.com] Connecting to remote server admin.vdomain.com failed with the following error message: The WS-Management service can't process the request. The maximum number of concurrent shells for this tenant has been exceeded. Close existing shells or raise the quota for this tenant. For more information, see the Remote Troubleshooting.
Resolution: The only way to resolve this issue is to close one or more of the previous connections. When you're finished with a Skype for Business Online session, we recommend that you use the Remove-PSSession cmdlet to terminate that session. This will help you to prevent this issue.
Related articles
Set up your computer for skype for business online management using Windows PowerShell.