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

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.

For the Users you have to go to Users > Manage users. But here are all Users not only the ones with Phone Numbers

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.

I found a handy Script from Andrew Morpheth on Github

The Script will export all Numbers to a CSV

Make sure you have these Azure AD Roles assigned:
Skype for Business Administrator
Teams Administrator

Otherwise you will run into this Error

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

Andres Bohren