Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Div | ||||
---|---|---|---|---|
| ||||
In This Article
|
Overview
This article covers de-provisioning users from Teams Direct Routing.deprovisioning users for Teams direct routing in the Teams Admin Center (TAC) and PowerShell.
Info |
---|
NOTE After de-provisioning deprovisioning a user, you can remove their Teams Phone add-on license. If you are switching the user to use Microsoft's voice environment, keep the Teams Phone add-on license assigned, and then add a Microsoft calling plan license. |
Warning |
---|
WARNING Do not remove the Teams Phone add-on license to de-provision a direct routing user. Removing the Teams Phone add-on license will not clear the user's direct routing configuration. Also, the phone number assigned to the user will remain associated with the user account, and it cannot be assigned to another user until it is cleared, or you delete the user account from your environment. If you need to clear the phone number from an unlicensed user account, you will need to re-assign the Teams Phone add-on license, and properly de-provision the user. |
Deprovision Using the Teams Admin Center
These steps show you how to deprovision a single user account for Teams direct routing in the Teams Admin Center (TAC). The TAC does not provide any feedback on a user's current direct routing status. If you need to check the status of a user's configuration, or do any troubleshooting, you should use PowerShell.
Info |
---|
NOTE Make sure the user account is still properly licensed before removing their direct routing configuration. Do not remove the Teams Phone add-on license to de-provision a direct routing user. The user account should have a license that includes MS Teams, and the Teams Phone add-on license. Details on licensing requirements can be found in the Teams Direct Routing - 01 - Planning and Prerequisites article. |
Sign into the Teams Admin Center (TAC): https://admin.teams.microsoft.com
Remove a Direct Routing Phone Number
Users > Manage Users > Click on a user's Display Name to view their settings
Next to General Information, click Edit.
Image Added
In the right-hand flyout pane, clear the assigned phone number.
Image Added
Click the Apply button at the bottom of the flyout pane.
Image Added
The user account's properties will update to show the phone number removed.
Image Added
Remove the Voice Routing & Tenant Dial Plan Policies
Select the user account's Polices tab
Image Added
Edit the Assigned Policies
Image Added
In the right-hand flyout pane, towards the bottom of the policy list, select the Global policy configuration for the following:
- Dial Plan: Global (Org-wide default)
- Voice Routing Policy: Global (Org-wide default)
Image Added
Click the Apply button at the bottom of the flyout pane.
Image Added
The user's policy assignments will update to show the applied changes.
Image Added
Info |
---|
NOTE It can take up to 24 hours for Microsoft's services to apply the changes. Normally it takes 10-30 minutes. |
Deprovision Using PowerShell
These steps show you how to deprovision one or more user accounts from Teams direct routing using PowerShell. Before performing these steps make sure you are connected to your Microsoft Teams services using PowerShell. If needed, review the Teams Direct Routing - 01 - Planning and Prerequisites article for details.
Check the User's Status
The below commands can be used to view the voice properties of a user. This can be useful for checking the status of a user before and after deprovisioning.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Review a list of the user's properties related to Direct Routing Get-CsOnlineUser user@domain.com | FL Displ*, UserPri*, SipA*, EnabledIsSipEnabled, Inter*, TeamsUpgradeE*, Enterprise*, OnlineVoiceR*, TeamsCall*, TenantD*, VoiceP*, HostedVoicemail*, OnlineDial*, OnPremLineURI, LineURI # Review all of the user's properties Get-CsOnlineUser user@domain.com | FL * # Export a list of all voice users and their properties to a CSV file $CsvFilePath = "C:\Path\to\file.csv" Get-CsOnlineUser -ResultSize Unlimited2147483647 | Select Displ*, UserPri*, SipA*, EnabledIsSipEnabled, Inter*, TeamsUpgradeE*, Enterprise*, OnlineVoiceR*, TeamsCall*, TenantD*, VoiceP*, HostedVoicemail*, OnlineDial*, OnPremLineURI, LineURI | Export-Csv $CsvFilePath -nti |
Here's a description of the more important properties outputted with the above Get-CsOnlineUser commands:
- Enabled IsSipEnabled - Indicates whether the user is enabled for MS Teams or Skype for Business Online. If enabled this 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 Onlinecannot be configured for direct routing.
- EnterpriseVoiceEnabled - Indicates whether the user has been enabled for Enterprise Voice features (aka. Teams Phone). 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 - This can help with troubleshooting users that are not working as expected. Unfortunately, there's a lot of "UserTypes", and Microsoft does not have them documented. People in the Teams community have tried creating some documentation of their own, and doing a google Google search for InterpretedUserType will turn up some results, which may help. If not, you'll need to open a support case with Microsoft.
- TeamsUpgradeEffectiveMode - For Teams Direct Routing 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 Routingdirect routing, this should be set to an EIP-TDR-VRP 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 dial plan. If it's blank, the user has not been assigned a Teams Phone add-on license.
- HostedVoicemail - Enables a user's voice mail calls to be routed to a hosted version of Microsoft Exchange Server. It also enables Skype for Business users to directly place a call to another user's voice mail. It is recommended to enable this for all Teams users.
- 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.
Deprovision a Single User
The following will deprovision a single user from direct routing, and disable their Enterprise Voice features. When you're done, you can then remove the Teams Phone add-on license from the user account. This change will not affect any Audio Conferencing features.
Deprovision the User from Direct Routing. Make sure you modify line 2 to include the user's UPN.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Define the user's UPN $UPN = "user@domain.com" # This will deprovision the user's account for Direct Routing # and set their account to use the global voice routing policy Grant-CsOnlineVoiceRoutingPolicy -Identity $UPN -PolicyName $null Grant-CsTenantDialPlan -Identity $UPN -PolicyName $null SetRemove-CsUserCsPhoneNumberAssignment -Identity $UPN -OnPremLineUri $null -EnterpriseVoiceEnabled $False RemoveAll |
Deprovision All Users
The following will deprovision all users that are currently configured with Direct Routing using an Evolve IP voice routing policy, and also disables their Enterprise Voice features. When you're done, you can remove the Teams Phone add-on license from the user accounts. This change will not affect any Audio Conferencing features.
- Get-CsOnlineVoiceRoutingPolicyCsOnlineUser
- Get-CsOnlineUserCsOnlineVoiceRoutingPolicy
- Grant-CsOnlineVoiceRoutingPolicy
- Grant-CsTenantDialPlan
- Remove-CsPhoneNumberAssignmentSet-CsUser
Get all users assigned to an EIP voice routing policy.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Search string to find the EIP voice routing policies $VrPolicyName = "EvolveIP" # Get all users assigned to an Evolve IP voice routing policy $UserData = Get-CsOnlineUser -ResultSize Unlimited2147483647 | Where { $_.OnlineVoiceRoutingPolicy -like "*$($VrPolicyName)*"} # Show a list of the users assigned to an EIP voice routing policy $UserData | FT DisplayName, UserPrincipalName, OnlineVoiceRoutingPolicy, OnPremLineUri # Show the number of users assigned to an EIP voice routing policy $UserData.UserPrincipalName.Count |
Deprovision the list of users, and disable their Enterprise Voice features.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# This will loop through each user ForEach ($User in $UserData) { # These commands will deprovision the user's account for direct routing # and set their account to the global voice routing policy Grant-CsOnlineVoiceRoutingPolicy -Identity $User.UserPrincipalName -PolicyName $null Grant-CsTenantDialPlan -Identity $User.UserPrincipalName -PolicyName $null SetRemove-CsUserCsPhoneNumberAssignment -Identity $User.UserPrincipalName -OnPremLineUri $null -EnterpriseVoiceEnabled $False }RemoveAll } |