Quickly Provision a Phone in Teams Admin
If you license users for Teams Phone Standard you will need to Quickly Provision a Phone in Teams Admin. It also happens if you unlicensed a user for Teams and then reconsidered. It drops the phone number, and it will have to be re-provisioned
Follow the Steps below and you will have the users phone number back in no time!
Open PowerShell
Star PowerShell from Windows. You can either choose Windows PowerShell or Windows PowerShell ISE. I prefer ISE since I can cut and paste code and run it from the console a lot easier:
Install and Connect to the Teams Module
When the box is loaded. Install the module:
Install-Module -Name MicrosoftTeams
Then Connect:
Connect-MicrosoftTeams
You may want to put this into a nifty PowerShell script that automates the process if you feel you are going to be provisioning or de-provisioning phones quite often.
User Numbers when you Provision a Phone in Teams
Here I will show you not only how to add a user telephone number but also remove a telephone user number. Of course, removing a user number is important when they either change numbers or do not need the number anymore (i.e. – leave the organization).
Add User Number
Here is the example of setting the telephone number, assigning a default policy and enambling voicemail.
Set-CsPhoneNumberAssignment -Identity userid@<tenant.domain> -PhoneNumber '+1XXXXXXX' -PhoneNumberType DirectRouting
Grant-CsOnlineVoiceRoutingPolicy -Identity userid @<tenant.domain> -PolicyName "Policy Given to You by your Telco Provider" – or one you or your admin created
Set-CsOnlineVoiceMailUserSettings -Identity userid @<tenant.domain> -VoicemailEnabled $true
Remove User Number
In this example the user has the phone number and any policy assigned to them removed.
Grant-CsOnlineVoiceRoutingPolicy -Identity userid @<tenant.domain> -PolicyName $null
Remove-CsPhoneNumberAssignment -Identity userid @<tenant.domain> -RemoveAll
There you have it. A way to Quickly Provision a Phone in Teams Admin.