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.
Update the properties of a sharePointGroup object.
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 UpdatePermissions
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
PATCH /storage/fileStorage/containers/{fileStorageContainerId}/sharePointGroups/{sharePointGroupId}
Request body
In the request body, supply only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
Property |
Type |
Description |
description |
String |
The new description of the sharePointGroup. The description can't be longer than 512 characters. Optional. |
title |
String |
The new title of the sharePointGroup. The title can't be longer than 255 characters. Optional. |
Response
If successful, this method returns a 200 OK
response code and an updated sharePointGroup object in the response body.
Examples
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/storage/fileStorage/containers/b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z/sharePointGroups/12
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.sharePointGroup",
"title" : "This is the new group title",
"description": "Updated group description"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new SharePointGroup
{
OdataType = "#microsoft.graph.sharePointGroup",
Title = "This is the new group title",
Description = "Updated group description",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Storage.FileStorage.Containers["{fileStorageContainer-id}"].SharePointGroups["{sharePointGroup-id}"].PatchAsync(requestBody);
mgc-beta storage file-storage containers share-point-groups patch --file-storage-container-id {fileStorageContainer-id} --share-point-group-id {sharePointGroup-id} --body '{\
"@odata.type": "#microsoft.graph.sharePointGroup",\
"title" : "This is the new group title",\
"description": "Updated group description"\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewSharePointGroup()
title := "This is the new group title"
requestBody.SetTitle(&title)
description := "Updated group description"
requestBody.SetDescription(&description)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
sharePointGroups, err := graphClient.Storage().FileStorage().Containers().ByFileStorageContainerId("fileStorageContainer-id").SharePointGroups().BySharePointGroupId("sharePointGroup-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SharePointGroup sharePointGroup = new SharePointGroup();
sharePointGroup.setOdataType("#microsoft.graph.sharePointGroup");
sharePointGroup.setTitle("This is the new group title");
sharePointGroup.setDescription("Updated group description");
SharePointGroup result = graphClient.storage().fileStorage().containers().byFileStorageContainerId("{fileStorageContainer-id}").sharePointGroups().bySharePointGroupId("{sharePointGroup-id}").patch(sharePointGroup);
const options = {
authProvider,
};
const client = Client.init(options);
const sharePointGroup = {
'@odata.type': '#microsoft.graph.sharePointGroup',
title: 'This is the new group title',
description: 'Updated group description'
};
await client.api('/storage/fileStorage/containers/b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z/sharePointGroups/12')
.version('beta')
.update(sharePointGroup);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\SharePointGroup;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SharePointGroup();
$requestBody->setOdataType('#microsoft.graph.sharePointGroup');
$requestBody->setTitle('This is the new group title');
$requestBody->setDescription('Updated group description');
$result = $graphServiceClient->storage()->fileStorage()->containers()->byFileStorageContainerId('fileStorageContainer-id')->sharePointGroups()->bySharePointGroupId('sharePointGroup-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.share_point_group import SharePointGroup
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SharePointGroup(
odata_type = "#microsoft.graph.sharePointGroup",
title = "This is the new group title",
description = "Updated group description",
)
result = await graph_client.storage.file_storage.containers.by_file_storage_container_id('fileStorageContainer-id').share_point_groups.by_share_point_group_id('sharePointGroup-id').patch(request_body)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.sharePointGroup",
"id" : "12",
"title" : "This is the new group title",
"description": "Updated group description"
}