In This Article
This article covers provisioning a single user for Teams Direct Routing, and also using a CSV file to provision multiple users at the same time.
Regardless of which method you use to provision your users, first connect to your Skype for Business Online services using PowerShell. You do not need to connect to the Teams, Azure AD, or MSOL services. If needed, review the Teams Direct Routing - 01 - Planning and Prerequisites article for details.
IMPORTANT: Make sure your user accounts have been licensed before running these commands. They should have a license that includes MS Teams, and the Phone System license. Details can be found in the Teams Direct Routing - 01 - Planning and Prerequisites article.
If you are switching a user from a Microsoft calling plan to Teams direct routing, remove the phone number from the user, and then remove the calling plan license. Make sure you keep the Phone System license assigned.
Check the User's Status
The below commands can be used to view the voice properties of one or more users. This can be useful for checking the status of a user before and after configuring them for Direct Routing.
Here's a description of the more important properties outputted with the above commands:
- Enabled - Indicates whether the user is enabled for MS Teams or Skype for Business Online. If enabled is showing False, then the user account is either disabled (sign-in is blocked), or it doesn't have a license that includes MS Teams or Skype for Business Online.
- EnterpriseVoiceEnabled - Indicates whether the user has been enabled for Enterprise Voice. Enterprise voice has to be enabled for Teams Direct Routing to work.
- OnPremLineURI - Specifies the Evolve IP provisioned phone number assigned to the user. The phone number must be specified using the E.164 format and be prefixed with "tel:".
- LineURI - Shows the Evolve IP provisioned phone number assigned to the user based on the value of the OnPremLineURI parameter. If this parameter has a phone number, and OnPremLineURI is blank, the user has been assigned a phone number from Microsoft.
- InterpretedUserType - There are numerous user types that include both Skype for Business and Teams, and that includes user types that are in a provisioning state, or an error state. In the end, for Teams direct routing to work, this should show DirSyncSfBUser, PureOnlineSfBUser, DirSyncTeamsUser, or PureOnlineTeamsUser. However, immediately after provisioning a user for direct routing, the user type may show a provisioning or error state. If that's the case, just wait a few hours for it to update.
- TeamsUpgradeEffectiveMode - For Teams direct routing to work, this should show TeamsOnly.
- OnlineVoiceRoutingPolicy - If this is blank, the user is not assigned a voice routing policy. When a user is configured for Teams direct routing, this should be set to an Evolve IP voice routing policy. To view a list of voice routing policies in your tenant use the Get-CsOnlineVoiceRoutingPolicy command.
- TenantDialPlan - If this is blank, the user is assigned to the Global tenant dial plan. To view a list of dial plans in your tenant use the Get-CsTenantDialPlan command.
- TeamsCallingPolicy - If this is blank, the user is assigned to the Global calling policy. To view a list of calling policies use the Get-CsTeamsCallingPolicy command.
- TeamsCallParkPolicy - If this is blank, the user is assigned to the Global call park policy. To view a list of call park policies use the Get-CsTeamsCallParkPolicy command.
- VoicePolicy - When enabled for Direct Routing, this should show HybridVoice. If it shows BusinessVoice, the user has been assigned a Microsoft calling plan. If it's blank, the user has not been assigned a Phone System license.
- HostedVoicemail - Indicates whether the user has enabled their voicemail. By default, all users can enable/disable their voicemail from within the Teams app.
- HostedVoicemailPolicy - If this shows BusinessVoice, the user's voicemail is hosted by Microsoft. At this time Evolve IP does not plan to host voice mailboxes. So, BusinessVoice should be the value you see.
- OnlineDialinConferencingPolicy - If this shows ServiceAllowed, the user is enabled for Microsoft's Audio Conferencing. If this is blank, the user is not enabled for Audio Conferencing.
- OnlineDialOutPolicy - This policy defines the dial out restrictions from an audio conference. A table of the different policies and their restrictions can be found in this Microsoft article.
Provision a Single Teams User
Get the name of the EIP Voice Routing Policy, which has to be entered into the below block of PowerShell code.
Get the name of the EIP Tenant Dial Plan, which has to be entered in the below block of PowerShell code.
Provision a User for Direct Routing
Microsoft requires that all phone numbers be in the E.164 format. This means the following:
- Prefix the phone number with "tel:"
- Include a "+" before the country code
- No special characters or spaces to make the number human readable
In the below PowerShell code, be sure to change the relevant data on lines 2, 5, 8, & 11 to match your configuration and specific user.
Provision from a CSV File
CSV File Requirements
Create or use an existing CSV file that contains the following required fields:
DisplayName - User account display Name
UserUPN - User account's User Principal Name (Office 365 sign in address)
PhoneNumber - Assigned phone number including the country code (no special characters or spaces)
- Location - Determines which location a user will be assigned
Here's an example for the US region:
Here's an example for the EU region:
Provision Users from a CSV File
Paste the below PowerShell code into an editor like the PowerShell ISE or VSCode, and run it from there.
First, get the name of your Voice Routing Policies and Tenant Dial Plan, which has to be entered into the below block of US or EU PowerShell code on lines 8, 9, & 12.
Next, use these blocks of code, depending on your region, with the output from the previous query on lines 8, 9, & 12. Also define the path to your CSV file on line 5.