Overview
Microsoft Graph provides APIs for Microsoft 365 and a unified programmability model. It offers various APIs to work with Microsoft Teams, a chat-based workspace in Microsoft 365.
In this article, we will create a Microsoft Teams team using Microsoft Graph Explorer.
Microsoft Graph Explorer
It is a web-based tool to build and execute requests against Microsoft 365 resources using Microsoft Graph APIs. It helps us to test GET, POST, PUT, PATCH, and DELETE operations with v1.0 and Beta endpoints for resources in Microsoft 365. The APIs under /beta version may change in the future, so should be avoided using in the production-ready environments.
Create an Office 365 Group
Microsoft Teams team is backed up by an Office 365 Group. In Microsoft Graph, the Microsoft Teams team is represented by a group resource. Such groups have a resourceProvisioningOptions property set to Team.
We will start by creating an Office 365 group from Microsoft Graph Explorer.
To get all the Office 365 groups, use the below API:
GET https://graph.microsoft.com/v1.0/groups
We can create a new group as Microsoft 365 group (unified group) or Security group using below API:
POST https://graph.microsoft.com/v1.0/groups
Permissions requirement
Any of the below permission is required to call this API,
| Permission type | Permissions |
| Delegated (work or school account) | Group.ReadWrite.All, Directory.ReadWrite.All, Directory.AccessAsUser.All |
| Application | Group.Create, Group.ReadWrite.All, Directory.ReadWrite.All |
Request body
Use below request body,
{
"description": "Group for Graph Team",
"displayName": "Graph Team",
"groupTypes": [
"Unified"
],
"mailEnabled": true,
"mailNickname": "graphteam",
"securityEnabled": false,
"[email protected]": [
"https://graph.microsoft.com/v1.0/users/[email protected]"
]
}
The group type of Unified creates Microsoft 365 group (unified group). The users specified in [email protected] gets added as group owners.



Shubham RathiPosted Jan 18, 2023, 1:23 PM
Hi Nanddeep, Does this mean that before creating a Teams we need to have a O365 group. I have tried creating teams only using graph api but since the response from the request does not return any ID hence I am bound to use this method only. Is there any other way ?
Maragatha ManiPosted Oct 30, 2021, 4:57 AM
Nice Article
Venkatasubbarao PolisettyPosted Oct 12, 2021, 4:52 PM
Thank you Nanddeep Nachan for writing this article!
Sagar LadPosted Oct 8, 2021, 2:46 PM
Nice Article