Is their a graph API for microsoft teams admin, where I can assign a phone number to a user?

Jenuel Ganawed 20 Reputation points
2024-04-26T06:41:00.51+00:00

So, I am trying to find an API so that our customer can assign a phone number from our system, and it will call a graph API that would assign the phone number to their users. Is there away? because we don't want our customer to manually setup everything on their Microsoft team's admin portal just to set this up. Thank you so much.

Microsoft Teams | Development
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-04-26T07:26:56.1633333+00:00

    The officially supported method is via PowerShell and the Set-CsPhoneNumberAssignment. Which in turn calls a RESTful endpoint on the backend, similar to the way Graph API works. But for the time being, there is no official support for performing this operation via Graph.

    If you don't care about the "supported" part, you can get the needed info to build your own solution in one of two ways: capture the network trace from the browser when performing the phone assignment via the Teams admin portal, or capture the network trace when executing the corresponding PowerShell cmdlet. Here are some notes I did on the latter back in the day: https://www.michev.info/blog/post/3870/teams-remote-powershell-updates-and-new-api-endpoints

    0 comments No comments

  2. CarlZhao-MSFT 46,371 Reputation points
    2024-04-26T07:43:53.74+00:00

    Hi @Jenuel Ganawed

    Yes, you can assign a businessPhone number or a mobilePhone number to a user by updating the user.

    User's image

    Before doing so, please check the notes:

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    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.