Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Create a new sharePointGroup object. The sharePointGroup only exists within the scope of the fileStorageContainer in which it was created. To add permissions for the sharePointGroup on driveItem objects, you must use the Create permission on a driveItem API. Up to 10,000 sharePointGroup objects can be created per fileStorageContainer. For more information on service limits, see SharePoint online limits.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ❌ | ❌ | ❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Not supported. | Not supported. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | FileStorageContainer.Selected | Not available. |
Note
In addition to Microsoft Graph permissions, applications calling this API must at least have the AddPermissions
container type-level permission on the container type of the corresponding containers. For more information, see container types. To learn more about container type-level permissions, see SharePoint Embedded authorization.
HTTP request
POST /storage/fileStorage/containers/{fileStorageContainerId}/sharePointGroups
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json. Required. |
Request body
In the request body, supply a JSON representation of the sharePointGroup object.
You can specify the following properties when you create a sharePointGroup.
Property | Type | Description |
---|---|---|
description | String | A user-visible description of the sharePointGroup. The description can't be longer than 512 characters. Optional. |
title | String | The title of the sharePointGroup. The title can't be longer than 255 characters. Required. |
Response
If successful, this method returns a 201 Created
response code and a sharePointGroup object in the response body.
Examples
Request
The following example shows a request that creates a new sharePointGroup that is local to a fileStoragContainer. The title and description of the sharePointGroup are shown in the request body.
POST https://graph.microsoft.com/beta/storage/fileStorage/containers/b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z/sharePointGroups
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.sharePointGroup",
"title": "Sample Group",
"description": "This is a sample description"
}
Response
The following example shows the response. The group is successfully created with a newly assigned ID that acts as an identifier.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.sharePointGroup",
"id" : "4",
"title": "Sample Group",
"description": "This is sample description"
}