Is there a way to retrieve teams calling purchased phone numbers from teams admin center using graph API with powershell.

Benard Mwanza 1,001 Reputation points
2024-08-23T12:14:01.08+00:00

Hi,

My organization bought phone numbers from teams admin center for voice calls. The phone numbers have been also assigned to users. Now i need to list this phone numbers using graph API to an external web application page.

I just need to know what is the https endpoint URI to make the request to retrieve those voice numbers.

For example the URI below will help get users

GET https://graph.microsoft.com/v1.0/users

I need a similar URI for voice phone numbers.

At the moment the SDK cmdlet below works when executing locally in device but it wont work in a web application scenario.

Get-CsPhoneNumberAssignment

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,076 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,978 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,244 questions
Microsoft Teams Phone
Microsoft Teams Phone
Teams Phone enables call-control and Private Branch Exchange (PBX) capabilities in the Microsoft 365 cloud with Microsoft Teams.
153 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Holger Bunkradt 16 Reputation points
    2024-08-26T10:21:06.6+00:00

    hi @Benard Mwanza , at the moment no MSGraph option exist to get assigned phonenumbers for Teams user. You still need powershell for your request.

    https://msunified.net/2021/08/18/find-available-phone-numbers-with-get-teamsnumbers-ps1/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.