Can I set direct routing and assign phone number to user using Graph API?

Abdullah Miah 31 Reputation points
2022-09-28T10:56:36.017+00:00

Hi folks,

We want to set users' "Phone number type" to "Direct Routing" and also set "Assigned phone number" to a number from our SIP pool.

We used to do this using PowerShell:
Set-CsPhoneNumberAssignment -Identity $username -PhoneNumber "$tel" -PhoneNumberType DirectRouting

How does one do this using Graph?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,201 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,772 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.
127 questions
0 comments No comments
{count} vote

Accepted answer
  1. RajeshKumarMSFT 1,971 Reputation points Microsoft Vendor
    2022-09-29T18:39:10.647+00:00

    Hi @Abdullah Miah ,

    Hope you are doing well,

    We can update the users phone number using below Graph PS SDK with this Command .
    Update-MgUser -UserID "Emailadress" -mobilephone "10101010101"

    Please refer this link for More details
    -https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.users/update-mguser?view=graph-powershell-1.0

    Currently , we can update only the listed properties of user by using graph API endpoint. and currently there is no property to update the Phone number type using graph.

    For Additional reference follow this link

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

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful