Skip to main content

teams team add

Adds a new Microsoft Teams team

Usage

m365 teams team add [options]

Options

-n, --name [name]

Display name for the Microsoft Teams team. Required if template not supplied.

-d, --description [description]

Description for the Microsoft Teams team. Required if template not supplied.

--template [template]

Template to use to create the team. If name or description are supplied, these take precedence over the template values.

--wait

Wait for the team to be provisioned before completing the command.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

If you want to add a Team to an existing Microsoft 365 Group use the entra m365group teamify command instead.

This command will return different responses based on the presence of the --wait option. If present, the command will return a group resource in the response. If not present, the command will return a teamsAsyncOperation resource in the response.

Examples

Add a new Microsoft Teams team.

m365 teams team add --name "Architecture" --description "Architecture Discussion"

Add a new Microsoft Teams team using a template from a file.

m365 teams team add --name "Architecture" --description "Architecture Discussion" --template @template.json

Add a new Microsoft Teams team using a template and wait for the team to be provisioned.

m365 teams team add --name "Architecture" --description "Architecture Discussion" --template @template.json --wait

Response

Standard response

{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('a40210cd-0060-4b91-aaa1-a44e0853d979')/operations/$entity",
"id": "d708ecb3-3325-4f6e-a0f7-2f982901b856",
"operationType": "createTeam",
"createdDateTime": "2022-10-31T12:50:44.0819314Z",
"status": "notStarted",
"lastActionDateTime": "2022-10-31T12:50:44.0819314Z",
"attemptsCount": 1,
"targetResourceId": "a40210cd-0060-4b91-aaa1-a44e0853d979",
"targetResourceLocation": "/teams('a40210cd-0060-4b91-aaa1-a44e0853d979')",
"Value": "{\"apps\":[],\"channels\":[],\"WorkflowId\":\"westeurope.0837160b-803e-4279-9f2c-a5cc46ffc748\"}",
"error": null
}

wait response

When we make use of the option wait the response will differ.

{
"id": "d592059d-100f-48c6-8a91-b68eec00ecec",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2022-11-04T12:46:47Z",
"creationOptions": [
"Team",
"ExchangeProvisioningFlags:3552"
],
"description": "Architecture Discussion",
"displayName": "Architecture",
"expirationDateTime": null,
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mail": "Architecture@contoso.onmicrosoft.com",
"mailEnabled": true,
"mailNickname": "Architecture",
"membershipRule": null,
"membershipRuleProcessingState": null,
"onPremisesDomainName": null,
"onPremisesLastSyncDateTime": null,
"onPremisesNetBiosName": null,
"onPremisesSamAccountName": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"preferredLanguage": null,
"proxyAddresses": [
"SMTP:Architecture@contoso.onmicrosoft.com"
],
"renewedDateTime": "2022-11-04T12:46:47Z",
"resourceBehaviorOptions": [
"HideGroupInOutlook",
"SubscribeMembersToCalendarEventsDisabled",
"WelcomeEmailDisabled"
],
"resourceProvisioningOptions": [
"Team"
],
"securityEnabled": false,
"securityIdentifier": "S-1-12-1-3583116701-1220939791-2394329482-3974889708",
"theme": null,
"visibility": "Public",
"onPremisesProvisioningErrors": []
}

More information

CTRL + M