Microsoft Teams Export assigned Phonenumbers to CSV
Hi All,
Did you ever wanted to have a List of all assigned Phone Numbers in Teams?
For CallQueues and Autoattendant you can find the List of ResourceAccounts in Teams Admin Center (TAC) under Voice > Resouce accounts
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_01.jpg)
Sadly, the same does not apply for Users. Under "Phone Numbers" you will find only a List of Numbers if you're using Operator connect.
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_02.jpg)
For the Users you have to go to Users > Manage users. But here are all Users not only the ones with Phone Numbers
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_07.jpg)
Maybe you can use a Filter. Best fit would probably to query the voice routing policy - given you have set that for every user correctly.
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_08.jpg)
I found a handy Script from Andrew Morpheth on Github
The Script will export all Numbers to a CSV
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_03.jpg)
Make sure you have these Azure AD Roles assigned:
Skype for Business Administrator
Teams Administrator
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_04.jpg)
Otherwise you will run into this Error
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_05.jpg)
Here is the Export.
Sadly the Callqueues and Autoattendands are listed double (Type User and CallQueue/Autoattendant)
But hey, i think the Script is still handy
![](https://icewolffile.blob.core.windows.net/$web/202201/Teams_PhoneNumbers_06.jpg)
Regards
Andres Bohren