Set Share Properties

The Set Share Properties operation sets properties for the specified Azure file share. Although this operation is fully supported, it's a legacy management operation. We recommend that you use the File Shares - Update operation provided by the storage resource provider (Microsoft.Storage) instead. To learn more about programmatically interacting with FileShare resources by using the storage resource provider, see Operations on FileShare resources.

Protocol availability

Enabled file share protocol Available


You can construct the Set Share Properties request as follows. We recommend HTTPS. Replace myaccount with the name of your storage account.

Method Request URI HTTP version

Replace the path components shown in the request URI with your own, as follows:

Path component Description
myaccount The name of your storage account.
myshare The name of your file share.

For details on path naming restrictions, see Naming and referencing shares, directories, files, and metadata.

URI parameters

You can specify the following additional parameters in the request URI:

Parameter Description
timeout Optional. Expressed in seconds. For more information, see Set timeouts for Azure Files operations.

Request headers

The following table describes required and optional request headers:

Request header Description
Authorization Required. Specifies the authorization scheme, account name, and signature. For more information, see Authorize requests to Azure Storage.
Date or x-ms-date Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authorize requests to Azure Storage.
x-ms-version Required for all authorized requests. Specifies the version of the operation to use for this request. For more information, see Versioning for the Azure Storage services.
x-ms-share-quota Optional. Supported in version 2015-02-21 and later. Specifies the maximum size of the share, in gibibytes (GiB).
x-ms-access-tier Optional. Supported in version 2019-12-12 and later. Specifies the access tier of the share. Valid values are TransactionOptimized, Hot, and Cool. For detailed information about file share tiering, see Azure Files storage tiers
x-ms-root-squash: <NoRootSquash | RootSquash | AllSquash> Optional. Supported in version 2020-02-10 and later. Specifies the root squashing behavior on the share when NFS is enabled. If it's not specified, the default is NoRootSquash.
  • NoRootSquash: Turn off root squashing.
  • RootSquash: Map requests from UID/GID 0 to the anonymous UID/GID.
  • AllSquash: Map all UIDs and GIDs to the anonymous user.
x-ms-client-request-id Optional. Provides a client-generated, opaque value with a 1-kibibyte (KiB) character limit that's recorded in the Storage Analytics logs when logging is configured. We highly recommend that you use this header to correlate client-side activities with requests that the server receives. For more information, see Monitor Azure Blob Storage.
x-ms-lease-id:<ID> Required if the destination file share has an active lease. Available for version 2020-02-10 and later. If the request doesn't include the lease ID or it isn't valid, the operation fails with status code 412 (Precondition Failed).

If this header is specified and the destination file share doesn't currently have an active lease, the operation fails with status code 412 (Precondition Failed).

Request body


Sample request

Request Headers:  
x-ms-version: 2020-02-10  
x-ms-date: <date>  
Authorization: SharedKey myaccount: Z5043vY9MesKNh0PNtksNc9nbXSSqGHueE00Jdjid0Q=  
x-ms-share-quota: 55  
x-ms-root-squash: RootSquash


The response includes an HTTP status code and a set of response headers.

Status code

A successful operation returns status code 200 (OK).

For information about status codes, see Status and error codes.

Response headers

The response for this operation includes the following headers. The response might also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response header Description
Last-Modified Returns the date and time that the share was last modified. The date format follows RFC 1123. For more information, see Representation of date/time values in headers. Any operation that modifies the share or its properties updates the last modified time. Operations on files don't affect the last modified time of the share.
ETag Contains a value that represents the version of the share, as a quoted string.
x-ms-request-id Uniquely identifies the request that was made. You can also use it to troubleshoot the request. For more information, see Troubleshoot API operations.
x-ms-version Indicates the version of Azure Files that's used to execute the request.
Date or x-ms-date A UTC date/time value that indicates the time at which the service sent the response.
x-ms-client-request-id Can be used to troubleshoot requests and corresponding responses. The value of this header is equal to the value of the x-ms-client-request-id header, if it's present in the request and the value is at most 1,024 visible ASCII characters. If the x-ms-client-request-id header is not present in the request, this header won't be present in the response.

Response body



Only the account owner can call this operation.


For more information on setting the share quota, see Create Share.

If you set share quota to be smaller than the size of the data on the share, the operation will succeed. However, you won't be able to add more data to the share until the amount of the data on the share is reduced below the quota. You can reduce the amount of data by either deleting or compressing files.

Set Share Properties is not supported for a share snapshot. An attempt to perform this operation on a share snapshot will fail with status code 400 (InvalidQueryParameterValue).

See also

Operations on FileShare resources (Azure Files)