Skip to content
Create Group logo

Create Group

Creates a new Microsoft 365 group. The group can be a unified group (Microsoft 365 group) that can later be team-enabled, or a security group.

SKILL.md

Full skill instructions

Create Group

Creates a new Microsoft 365 group. The group can be a unified group (Microsoft 365 group) that can later be team-enabled, or a security group.

API Details

Sandbox

Mock server URL: http://localhost:8080/rest/microsoft-teams-api/1.0.0/groups

Required Headers

  • Authorization: Bearer {access-token}
  • Content-Type: application/​json

OAuth Scopes

  • Group.ReadWrite.All

Request Body

FieldTypeRequiredDescription
displayNamestringYesThe display name of the group
descriptionstringNoA description of the group
mailEnabledbooleanYesWhether the group is mail-enabled
mailNicknamestringYesThe mail alias for the group
securityEnabledbooleanYesWhether the group is security-enabled
groupTypesarrayNoGroup types (e.g., ["Unified"] for Microsoft 365 groups)
visibilitystringNoThe visibility of the group (Private or Public)
{
  "displayName": "Project Alpha Group",
  "description": "Microsoft 365 group for Project Alpha",
  "mailEnabled": true,
  "mailNickname": "projectalpha",
  "securityEnabled": false,
  "groupTypes": ["Unified"],
  "visibility": "Private"
}

Example Request

curl -s -X POST \
  "http://localhost:8080/rest/microsoft-teams-api/1.0.0/groups" \
  -H "Authorization: Bearer {access-token}" \
  -H "Content-Type: application/​json" \
  -d '{
    "displayName": "Project Alpha Group",
    "description": "Microsoft 365 group for Project Alpha",
    "mailEnabled": true,
    "mailNickname": "projectalpha",
    "securityEnabled": false,
    "groupTypes": ["Unified"],
    "visibility": "Private"
  }'

Example Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "displayName": "Project Alpha Group",
  "description": "Microsoft 365 group for Project Alpha",
  "mailEnabled": true,
  "mailNickname": "projectalpha",
  "securityEnabled": false,
  "groupTypes": [
    "Unified"
  ],
  "visibility": "Private"
}

Instructions

When the user wants to create a new Microsoft 365 group or security group, use this operation. Provide the required fields including displayName, mailEnabled, mailNickname, and securityEnabled. For Microsoft 365 groups (unified groups), include "Unified" in the groupTypes array.