Skip to content

Commit ecb481a

Browse files
thomasbermanVesaJuvonen
authored andcommitted
Added information on creating "modern" team site via REST (SharePoint#2747)
Added information to the section describing how to create "modern" team sites via the Groups API in Microsoft Graph including a sample POST request.
1 parent cece342 commit ecb481a

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

docs/solution-guidance/modern-experience-customizations-provisioning-sites.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,28 @@ For more information, see the following Office Support article:
4444

4545
### Provision a "modern" team site programmatically via SharePoint Online REST API
4646

47-
"Modern" team sites can be created programmatically by using a REST API provided by SharePoint Online, and also used by the Create Site UI of SharePoint Online.
47+
"Modern" team sites can be created programmatically by using a REST API provided by SharePoint Online, and also used by the Create Site UI of SharePoint Online. To provision a "modern" team site via REST, make a POST reqeust to the Microsoft Graph "groups" endpoint: ```https://graph.microsoft.com/v1.0/groups```
48+
49+
The URI of the "modern" team site is determined by the **mailNickname** parameter and the managed path you select for team sites in your tenant administration (this defaults to 'sites').
50+
51+
The following would create an Office 365 group and an associated "modern" team site with a URL of ```https://[tenant].sharepoint.com/sites/mymodernteamsite```
52+
53+
```
54+
POST https://graph.microsoft.com/v1.0/groups
55+
Content-type: application/json
56+
Content-length: 200
57+
58+
{
59+
"description": "description",
60+
"displayName": "My modern team site",
61+
"groupTypes": [
62+
"Unified"
63+
],
64+
"mailEnabled": true,
65+
"mailNickname": "mymodernteamsite",
66+
"securityEnabled": false
67+
}
68+
```
4869

4970
### Provision a "modern" team site by using the PnP CSOM Core component
5071

0 commit comments

Comments
 (0)