Microsoft Teams Direct Routing Phone Number Inventory
Hi All,
I saw this Message in the M365 Message Center a few Days ago and was very exited.
Until now you had to maintain a List of your Direct Routing Phone Numbers. I’ve seen Excel Spreadsheets, a SharePoint List, an SQL Database, Integrated in Service Now or 3rd party solutions like NumberPro.
Phone Number Management
It’s best when you use the most recent MicrosoftTeams PowerShell Module 6.8.0.
Let’s list the Phone Numbers in my Microsoft Teams Tenant
Connect-MicrosoftTeams
Get-CsPhoneNumberAssignment | Sort-Object TelephoneNumber | ft TelephoneNumber, NumberType, AssignedPstnTargetId
Now, let’s add the Telephone Numbers. I own 10 Numbers from 70 to 79.
New-CsOnlineDirectRoutingTelephoneNumberUploadOrder -StartingNumber "+41215553970" -EndingNumber "+41215553979"
Let’s have a look withe OrderId that has been given back.
As you can see it’s only “PartialSuccess”. You can see the WarningPhoneNumbers and the SuccessPhoneNumbers.
Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId 3d9b0307-36aa-43af-8302-9ffae9686150
In the Teams Admin Center unter Voice > Phone numbers you can find the “Order history”
You can see that some Numbers have Warnings. In my case it’s because they are already used.
Now let’s remove a Numbef from the Pool. This could be useful if you have special Numbers like double Numbers at the End (77) in my case or any other Number that should not be assigned to a user.
New-CsOnlineTelephoneNumberReleaseOrder -TelephoneNumber "+41215553975"
Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId 7fdbbede-e578-42c7-8efa-75b7bd085a73
When we have a look at the Phone numbers in Teams Admin Center the Number with 75 has been disappeared from the list. And you can see here, whitch numbers have been assigned to a User, a Callqueue or an Autoattendant.
The really cool thing is when you assign a Number to a Teams User. You can now select the Number from the dropdown list.
And that is how it looks after assigning the Number to the User.
Summary
Now you know, how you can handle your Microsoft Direct Routing Phone Number Inventory.
Links to MS Learn for the new commands:
- New-CsOnlineDirectRoutingTelephoneNumberUploadOrder
- Get-CsOnlineTelephoneNumberOrder
- New-CsOnlineTelephoneNumberReleaseOrder
Regards
Andres Bohren