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
Update the properties of a fileStorageContainerType object. The properties updated are reflected in each registered fileStorageContainerTypeRegistration in a maximum of 24 hours. Settings overridden in a tenant aren't updated.
Note: When the settings are updated, the behavior of any new fileStorageContainer changes, but existing containers might require their settings to be updated directly or might not be updated; for example, storage size.
ETag is used for optimistic concurrency control. It must match the value from Create, Get or the previous Update.
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) | FileStorageContainerType.Manage.All | Not available. |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | Not supported. | Not supported. |
HTTP request
PATCH /storage/fileStorage/containerTypes/{fileStorageContainerTypeId}
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 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 |
|---|---|---|
| name | String | Name of the fileStorageContainerType. Optional. |
| settings | fileStorageContainerTypeSettings | fileStorageContainerType settings. Optional. |
| etag | String | Used for optimistic concurrency control. Must match the value returned from a Create or Get request. Required. |
Response
If successful, this method returns a 200 OK response code and an updated fileStorageContainerType object in the response body.
Examples
Example 1: Update a fileStorageContainerType
The following example shows how to update a fileStorageContainerType.
Request
The following example shows a request.
PATCH https://graph.microsoft.com/v1.0/storage/fileStorage/containerTypes/de988700-d700-020e-0a00-0831f3042f00
Content-Type: application/json
{
"settings": {
"urlTemplate": "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}",
"isItemVersioningEnabled": true,
"isSharingRestricted": false
},
"etag": "RVRhZw=="
}
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.fileStorageContainerType",
"id": "de988700-d700-020e-0a00-0831f3042f00",
"name": "Container Type Name",
"owningAppId": "11335700-9a00-4c00-84dd-0c210f203f00",
"billingClassification": "trial",
"billingStatus": "valid",
"createdDateTime": "01/20/2025",
"expirationDateTime": "02/20/2025",
"etag": "RVRhZyArIDE=",
"settings": {
"urlTemplate": "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}",
"isDiscoverabilityEnabled": true,
"isSearchEnabled": true,
"isItemVersioningEnabled": true,
"itemMajorVersionLimit": 50,
"maxStoragePerContainerInBytes": 104857600,
"isSharingRestricted": false,
"consumingTenantOverridables": ""
}
}
Example 2: Update a fileStorageContainerType without ETag
The following example shows how to update a fileStorageContainerType without an etag.
Request
The following example shows a request.
PATCH https://graph.microsoft.com/v1.0/storage/fileStorage/containerTypes/de988700-d700-020e-0a00-0831f3042f00
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.fileStorageContainerType",
"settings": {
"urlTemplate": "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}",
"isItemVersioningEnabled": true,
"isSharingRestricted": false
}
}
Response
The following example shows the response.
HTTP/1.1 400 Bad Request