LATEST NEWS

Activate Teams users for Direct Routing

KBA-01606-j6S5

Summary

This article provides the technical instruction on how to activate users for MS Teams calling using Direct Routing provided by Universal IT.

License Requirements: users in Microsoft 365 require a Microsoft 365 Business plan or a Microsoft Enterprise (E1, E3, E5) plan in combination with either a Microsoft 365 Business Voice or Microsoft 365 Phone System license.


Setup Microsoft Teams PowerShell Module (Version 2.0.0>)

At the time of writing, Microsoft has released a new Microsoft Teams PowerShell module that replaces the old Skype Online Connector. However, there’s a bug in the 2.3.0. version that is unable to use the Set-CsUser command. Therefore we have to manually install the 2.0.0version. Before starting, make sure you have removed the Skype Online Connector from your Programs and Features list in Windows. After that, use the command Uninstall-MicrosoftTeams to remove all previous versions of Teams PowerShell module.
Use the command below to install the 2.0.0 version of the module.
Install-Module -Name MicrosoftTeams -RequiredVersion 2.0.0


PowerShell Direct Routing commands

Connect to Microsoft Teams tenant using the command below. You will get a modern authentication challenge. You need to login as a Teams/Skype administrator to perform these commands. Global Administrator also works.

Connect-MicrosoftTeams
 
Once you are connected, you can enable the user to be EnterpriseVoiceEnabled and to assign a LineURI (Phone number). Make sure you use the number with the full country code.
Set-CsUser -Identity user@example.com -EnterpriseVoiceEnabled:$True -HostedVoiceMail:$True -OnPremLineURI:”TEL:+311234567
 
The next steps are to assign a Online Voice Routing Policy and a Teams Calling Policy. When setting up Direct Routing for the first time, Universal typically uses the “Teams” Online Voice Routing Policy and the AllowCalling Teams Calling Policy. Depending on the customer, these policies can either have a different name or have multiple policies enabled in the tenant. Use the Get- variants of the commands below or go to the Teams admin center to check which policies are available.
Grant-CsOnlineVoiceRoutingPolicy user@example.com -PolicyName “Teams” 
Grant-CsTeamsCallingPolicy -PolicyName Tag:AllowCalling -Identity user@example.com
 
It can take up to 24 hours before a user is fully activated for Teams calling.
If you wish to check which users have which numbers assigned, use the command below.
Get-CsOnlineUser | Where { $_.EnterpriseVoiceEnabled } | Select-Object UserprincipalName,DisplayName,LineURI
 
If you are a Universal IT customer and outbound calling is not working, but inbound calling is, please contact our helpdesk for further assistance.

 

Legacy information when using the Skype for Business Online Connector and Microsoft Teams Powershell module below version 2.0.0. ONLY use for legacy setups!

The Microsoft Teams PowerShell module needs to be present on the device you are assigning licenses from: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install. Also, the Skype for Business Online Connector needs to be installed. There is no longer an active download link by Microsoft to download this software, since it’s end-of-life. Only use the below commands if you still have the Skype for Business Online Connector installed with the MicrosoftTeams PowerShell module below version 2.0.0. If you are starting with managing Direct Routing for the first time, follow the instructions above to use the new MicrosoftTeams PowerShell module.
From there you need to connect to the customer’s Teams tenant using the following commands. When prompted, use the credentials of a Global Admin or a Teams/Skype Admin.
Import-Module MicrosoftTeams
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession
Once you are connected, you can enable the user to be EnterpriseVoiceEnabled and to assign a LineURI (Phone number). Make sure you use the number with the full country code.
Set-CsUser user@example.com -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+311234567
 
The next steps are to assign a Online Voice Routing Policy and a Teams Calling Policy. When setting up Direct Routing for the first time, Universal typically uses the “Teams” Online Voice Routing Policy and the AllowCalling Teams Calling Policy. Depending on the customer, these policies can either have a different name or have multiple policies enabled in the tenant. Use the Get- variants of the commands below or go to the Teams admin center to check which policies are available.
Grant-CsOnlineVoiceRoutingPolicy user@example.com -PolicyName “Teams” 
Grant-CsTeamsCallingPolicy -PolicyName Tag:AllowCalling -Identity user@example.com


It can take up to 24 hours before a user is fully activated for Teams calling. 

Universal Support
The Universal Support Desk can perform the above actions for you. For assistance; please click on the following link (using a Microsoft 365 admin account):

Share this:

Share on linkedin
Share on twitter
Share on facebook
Share on email