Unable to create Team using MS-Graph API

Tony Lockhart 46 Reputation points
2022-02-22T19:40:09.163+00:00

I am currently attempting to integrate a MS Teams service into a chat application, via MS-Graph API. I am able to generate AuthTokens, create a group, and pull user profiles. The app service has the correct Teams API permissions (Application Team.Create, Teamwork.Migrate.All, Group.ReadWrite.All**, Directory.ReadWrite.All**). However, when I attempt to create a Team I receive the error below. Can anyone provide any assistance? Please github [link][https://github.com/tlockhart/ms-graph.git] for details. My code uses the following endpoints:

Endpoints

MS_AUTH_URL=https://login.microsoftonline.com/
GRAPH_API_URL="https://graph.microsoft.com/"

body: {
error: {
code: 'Forbidden',
message: 'Teams is disabled for the tenant. Ensure the tenant has a valid Office365 subscription.',
innerError: [Object]
}
},

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,644 questions
{count} votes

Accepted answer
  1. CarlZhao-MSFT 37,216 Reputation points
    2022-02-23T03:08:42.733+00:00

    Hi @Tony Lockhart

    From my testing, only Office 365 Standard is enough to create a team, check your user's license to make sure it has the Microsoft Teams service enabled.

    177071-image.png

    177025-image.png

    Also you need to make sure you are using a user with Office 365 Standard license to log in and get a token, your token must have your user info in it.

    177026-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. Manu Philip 16,986 Reputation points MVP
    2022-02-23T02:32:11.307+00:00

    Office 365 Standard can support to have a Teams. Reference: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/prepare-your-o365-tenant

    Are you able to initiate a chat as I have explained in this post? This will make sure that you are able to do it out of the code


  2. Tony Lockhart 106 Reputation points
    2022-02-23T20:36:01.84+00:00

    Although, I signed up for an MS 365 subscription, it is not displaying in my Azure Account. So I can not select it in the licenses. This seems like the problem, but have been unsuccessful in getting on the line with someone from microsoft, who can fix the issue.

    177352-screen-shot-2022-02-23-at-33342-pm.png

    0 comments No comments

  3. Kevin Murrell 1 Reputation point
    2022-03-23T10:20:23.883+00:00

    Hi Tony,
    We have exactly the same issue, did you ever get a response from MS or find a solution to this please ?

    0 comments No comments

  4. Kevin Murrell 1 Reputation point
    2022-03-23T11:56:50.073+00:00

    turns out that when 365 was added we got a different azure signon and the subscription was attached to that, creating the Teams app registration on that worked fine

    0 comments No comments