Can I enable Teams for a user and give him a telephone number with the MS Graph API?

Jandt Uwe 20 Reputation points
2023-03-13T13:48:41.7933333+00:00

Hi all,

I^m quite new with the graph API, so this might be a rookie's question:

We need to assign MS Teams to migrated users. We want to enable it for the user via Graph API and assign at the same time a telephone no to him. Is this possible with graph, or must we have a powershell script for that?

Of course I searched in the docu and found info about role assignment, but I don't know which steps to take to "create" a teams enabled user.

In the powershell script of a college following cmdlets are used:

Grant-CsOnlineVoiceRoutingPolicy

Grant-CsTenantDialPlan

Grant-CsTeamsEmergencyCallRoutingPolicy

Grant-CsTeamsCallingPolicy

Grant-CsTeamsCallHoldPolicy

Grant-CsCallingLineIdentity

Grant-CsDialoutPolicy

Grant-CsTeamsAudioConferencingPolicy

Thanks in advance for any help,

Uwe

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,522 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.
2,826 questions
0 comments No comments
{count} votes

Accepted answer
  1. Prasad-MSFT 5,616 Reputation points Microsoft Vendor
    2023-03-14T06:50:02.5466667+00:00

    Enabling Teams for a user and assigning telephone number using Graph API is not possible.
    However, you can follow below documents which explains how to manage teams and user access using PowerShell script along with assigning telephone number to user.
    Managing Teams and user access:
    1.https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-managing-teams

    2.https://learn.microsoft.com/en-us/microsoftteams/user-access

    Assigning phone number to a user or a resource account:

    1.https://learn.microsoft.com/en-us/powershell/module/teams/set-csphonenumberassignment?view=teams-ps

    2.https://learn.microsoft.com/en-us/microsoftteams/assign-change-or-remove-a-phone-number-for-a-user

    Thanks, 

    Prasad Das

    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 
     


0 additional answers

Sort by: Most helpful