Most of the time, we need to do a replica of the same Office 365 group with settings and so on. Microsoft Graph API comes with an awesome feature to do the same.

By using that we can clone the following items,

  1. Apps installed in the Team
  2. Tabs within each Channels
  3. All settings within the Team, along with key group settings
  4. Structure of the channel. (But messages won’t be copied)
  5. The members and owners of the team

Follow the below steps to clone the Team using Microsoft Graph Explorer,

  • Navigate to Microsoft graph Explorer aka.ms/ge
  • Then find out the team id/group id, you want to clone or copy
  • Select the Post method in Graph explorer
  • Select beta or v1.0 version
  • Enter the Graph API endpoint in the below format

https://graph.microsoft.com/v1.0/teams/<team id>/clone

  • Add the Content-Type : application/json as Request headers
  • Add the body in the below format,
{
"displayName": "Cloned Graph Team",
"description": "Testing the cloning feature from Microsoft Graph API",
"mailNickname": "clonegraphteam",
"partsToClone": "apps,tabs,settings,channels,members",
"visibility": "public"
}

  • Then click the Run query button to clone the Group/team based on the provided settings.

We can use the parts to clone parameter to define, which objects need to copy into the new group. Below is the screenshot in MS Team after few seconds.

Original and Cloned Teams