Script: Get Microsoft Teams Assigned Numbers

Script Overview

This script queries Microsoft Teams for assigned numbers and displays them in a formatted table with the option to export to CSV.

During processing LineURI’s are run against a regex pattern to extract the DDI/DID and the extension to a separate column.

This script collects Microsoft Teams objects including: Users, Meeting Rooms, Online Application Instances (Resource Accounts).

Download

Download the script over on GitHub.

This script does not collect objects from on-premises environments even if in hybrid, instead use this script.

Andrew Morpeth
Andrew Morpethhttps://ucgeek.co/author/amorpeth/
Andrew is a Modern Workplace Consultant specialising in Microsoft technologies based in Auckland, New Zealand; Andrew is a Director and Professional Services Manager at Lucidity Cloud Services and a Microsoft MVP.

Related Articles

7 COMMENTS

      • Thank very much for posting this. Extremely useful. I have already started using it.

        Is there another script that could show all the unassigned numbers only?

        Many thanks,
        Robbie

        • Thanks for your feedback. Are you looking for something that maintains a database of all your phone numbers and tracks what is and isn’t assigned? I built something like that for SfB, but I havent ported it to Teams yet.

          • Thank you very much for the reply. I have used the script of yours which is amazing. What I am looking for is a script which list all unassigned numbers to assigned to new staff members. However, that script you mentioned about the database of phone numbers and tracks what is and isn’t assigned, sounds amazing.

            Looking forward to your reply.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Andrew Morpeth
Andrew Morpethhttps://ucgeek.co/author/amorpeth/
Andrew is a Modern Workplace Consultant specialising in Microsoft technologies based in Auckland, New Zealand; Andrew is a Director and Professional Services Manager at Lucidity Cloud Services and a Microsoft MVP.

Latest Articles