This article provides detailed description of handling of error faced in Direct Routing Assignment and Settings in O365 (CSP) related to error "Skype for Business Online PowerShell connections are blocked".
This article applies to MachPanel v6.4.50 and later as well as "Skype for Business Online PowerShell connector" from Microsoft where "MicrosoftTeams Online PowerShell Connector" is now being used for management of all previous Skype for Business features.
Details: Error processing command: Processing data from remote server xyz123.online.lync.com failed with the following error message: Skype for Business Online PowerShell connections are blocked. Please replace the Skype for Business Online PowerShell connector module with the Teams PowerShell Module. Please visit https://aka.ms/sfbocon2tpm for supported options. For more information, see the about_Remote_Troubleshooting Help topic. CMDExec: get-CSOnlineVoiceRoutingPolicy -Filter "tag:*"
OR more generalized form of error is:
Skype for Business Online PowerShell connections are blocked. Please replace the Skype for Business Online PowerShell connector module with the Teams PowerShell Module. Please visit https://aka.ms/sfbocon2tpm for supported options. For more information, see the about_Remote_Troubleshooting Help topic.
Issue originated from Microsoft side when they blocked access to Skype for Business Online PowerShell connections. To solve this issue we worked on high priority and updated all code definitions to start using new module for Teams https://www.powershellgallery.com/packages/MicrosoftTeams/2.3.1 which has been updated and Skype for Business commands are made a part of it.
Microsoft has not updated commands reference yet for Teams module: https://docs.microsoft.com/en-us/powershell/module/teams/?view=teams-ps. but we have successfully updated MachPanel Direct Routing Teams module handling when using a user that is NOT MFA enabled.
Please go through and perform below changes to the setup to resolve this issue and start using MicrosoftTeams Module instead of SkypeForBusiness Connector.
- If you have installed any SkypeOnlineConnector module, Uninstall it from Add/Remove Programs in Windows Control Panel.
- If you have installed any MicrosoftTeams Module, Uninstall it using PowerShell command:
- Uninstall-Module MicrosoftTeams -Force
- Install latest Teams module using PowerShell command (Referrence: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install):
- Install-Module MicrosoftTeams
- Deploy lasted HF for control server version 6.4.50.
- If you are not on version 6.4.50 then update MachPanel Control Server and MachPanel Remote Server to the latest build i.e., 6.4.50 and then deploy Latest HF
- Update MachPanel Control Server:
- Update MachPanel Remote Server:
- After updating to the latest build i.e., 6.4.50 and then deploy Latest HF using below link
- At present the MFA enabled option must be disabled in panel and in Azure for the user and password must be updated in panel
We also worked on using MFA enabled user for new Teams module but facing below error:
PS C:\WINDOWS\system32> Set-CsOnlineUser
Get-CsOnlineSession : Run Connect-MicrosoftTeams before running cmdlets.
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.3.1\net472\SfBORemotePowershellModule.psm1:57 char:22
+ $remoteSession = & (Get-CsOnlineSessionCommand)
+ CategoryInfo : NotSpecified: (:) [Get-CsOnlineSession], UnauthorizedAccessException
+ FullyQualifiedErrorId : UnauthorizedAccessException,Microsoft.Teams.ConfigApi.Cmdlets.GetCsOnlineSession
Invoke-Command : Cannot
validate argument on parameter 'Session'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command
At present we are struggling with this error and as per comments mentioned belowhttps://techcommunity.microsoft.com/t5/teams-developer/authenticating-with-an-access-token-connect-microsoftteams/m-p/2233794
So, this problem is known but a fix is not released yet from Microsoft.
Hope that this new version will be released soon so that the MachPanel clients using MFA enabled user for managing tenants can use Direct Routing Modules as needed. We will release another patch as soon as issue is resolved at Microsoft end and a fix is released by them.