> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/cloud-devops/azure-file-storage.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Azure File Storage

Azure File Storage provides cloud file shares. Create shares, directories and files, copy files, and take share snapshots.

![Azure File Storage logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-f54008002f231fec2243b814df6b3fd8488330bd%2Fonedrive.png?alt=media)

|                    |                                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------- |
| **Category**       | [Cloud and DevOps](https://docs.fastn.ai/connectors/catalog/cloud-devops.md)                 |
| **Website**        | [file.core.windows.net](https://file.core.windows.net)                                       |
| **Authentication** | OAuth 2.0                                                                                    |
| **Slug**           | `azureFileStorage`                                                                           |
| **On fastn.ai**    | [Embed Azure File Storage in your product](https://fastn.ai/integrations/azure-file-storage) |

## Setup

Your customers sign in to Azure File Storage through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect Azure File Storage from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Azure File Storage**.
2. Select **Connect** on the Azure File Storage card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Azure File Storage and approve access in the window that opens.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Azure File Storage's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Abort Copy File</td><td><code>abortCopyFile</code></td><td>Aborts a pending asynchronous file copy and leaves the destination file with zero length and full metadata. Requires the copy identifier, which Copy File returns only in a response header this engine does not surface, so the identifier must be obtained out of band.</td></tr><tr><td>Copy File</td><td><code>copyFile</code></td><td>Starts an asynchronous server-side copy of a source file or blob to a destination file. Engine limitation: the copy identifier and status are returned only in the x-ms-copy-id and x-ms-copy-status response headers, which this engine does not surface, so a copy cannot be polled or aborted from this action's output.</td></tr><tr><td>Create Directory</td><td><code>createDirectory</code></td><td>Creates a new directory directly under the specified share. On SMB shares the file attribute and timestamp headers are optional from x-ms-version 2021-06-08 onward and default to Directory attributes with server-set timestamps. Engine limitation: the request builder percent-encodes a forward slash inside a path input to %2F, so directoryPath must be a single directory name; nested paths such as parent/child cannot be expressed and only directories immediately under the share root can be created.</td></tr><tr><td>Create File</td><td><code>createFile</code></td><td>Creates a new file of the given size within a share or directory. This reserves the byte range but writes no content; use Put Range to write data into the file. An existing file at the same path is overwritten and its content discarded.</td></tr><tr><td>Create Hard Link</td><td><code>createHardLink</code></td><td>Creates a hard link to an existing file within the same share. Available only on NFS file shares, which require a premium file storage account; on an SMB share Azure rejects this operation.</td></tr><tr><td>Create Share</td><td><code>createShare</code></td><td>Creates a new file share under the specified storage account. Share names must be lowercase, 3 to 63 characters, and may contain hyphens.</td></tr><tr><td>Create Share Snapshot</td><td><code>createShareSnapshot</code></td><td>Creates a read-only point-in-time snapshot of a file share. Engine limitation: the snapshot's DateTime identifier is returned only in the x-ms-snapshot response header, which this engine does not surface, so a successful call Recover the identifier by calling List Shares with include set to snapshots and reading the Snapshot element of the matching Share.</td></tr><tr><td>Create Symbolic Link</td><td><code>createSymbolicLink</code></td><td>Creates a symbolic link pointing at a target path. Available only on NFS file shares, which require a premium file storage account; on an SMB share Azure rejects this operation.</td></tr><tr><td>Delete Directory</td><td><code>deleteDirectory</code></td><td>Deletes an empty directory from a file share. The directory must contain no files or subdirectories, otherwise Azure directoryPath must be a single path segment because the request builder percent-encodes forward slashes.</td></tr><tr><td>Delete File</td><td><code>deleteFile</code></td><td>Immediately deletes a file from a file share. The delete is not reversible unless share soft-delete retention is enabled on the storage account.</td></tr></tbody></table>

<details>

<summary>View 33 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Delete Share</td><td><code>deleteShare</code></td><td>Marks a file share or share snapshot for deletion; the share and any files it contains are removed during garbage collection. Supply shareSnapshot to delete a single snapshot instead of the share itself.</td></tr><tr><td>Force Close Directory Handles</td><td><code>forceCloseDirectoryHandles</code></td><td>Forcibly closes open SMB handles on a directory, and optionally on everything beneath it. Pass an asterisk as handleId to close every handle. Engine limitation: the number of handles closed is returned only in the x-ms-number-of-handles-closed response header, which this engine does not surface.</td></tr><tr><td>Force Close File Handles</td><td><code>forceCloseFileHandles</code></td><td>Forcibly closes open SMB handles on a file. Pass an asterisk as handleId to close every handle on the file. Engine limitation: the number of handles closed is returned only in the x-ms-number-of-handles-closed response header, which this engine does not surface.</td></tr><tr><td>Get Directory Metadata</td><td><code>getDirectoryMetadata</code></td><td>Returns all user-defined metadata for a directory. Engine limitation: Azure returns metadata in x-ms-meta-{name} response headers, which this engine does not surface, so a successful call</td></tr><tr><td>Get Directory Properties</td><td><code>getDirectoryProperties</code></td><td>Returns all system properties and user-defined metadata for a directory. Engine limitation: Azure returns every property in x-ms-* response headers, which this engine does not surface, so a successful call directoryPath must be a single path segment because the request builder percent-encodes forward slashes.</td></tr><tr><td>Get File</td><td><code>getFile</code></td><td>Reads the content of a file, optionally restricted to a byte range. Text files round-trip correctly; binary content is corrupted by the engine's UTF-8 expansion of non-UTF-8 bytes, so this action is reliable for text files only.</td></tr><tr><td>Get File Metadata</td><td><code>getFileMetadata</code></td><td>Returns all user-defined metadata for a file. Engine limitation: Azure returns metadata in x-ms-meta-{name} response headers, which this engine does not surface, so a successful call</td></tr><tr><td>Get File Service Properties</td><td><code>getFileServiceProperties</code></td><td>Gets the properties of the File service on a storage account, including hour and minute metrics, CORS rules, share soft-delete retention and SMB protocol settings. Returns an XML StorageServiceProperties document.</td></tr><tr><td>Get Share ACL</td><td><code>getShareAcl</code></td><td>Returns the stored access policies specified on a file share, which can be used with shared access signatures. Returns an XML SignedIdentifiers document.</td></tr><tr><td>Get Share Metadata</td><td><code>getShareMetadata</code></td><td>Returns all user-defined metadata for a file share. Engine limitation: Azure returns metadata in x-ms-meta-{name} response headers, which this engine does not surface, so a successful call</td></tr><tr><td>Get Share Properties</td><td><code>getShareProperties</code></td><td>Returns all user-defined metadata and system properties of a file share, including quota, access tier and enabled protocols. Engine limitation: Azure returns every property in x-ms-* response headers, which this engine does not surface, so a successful call</td></tr><tr><td>Get Share Stats</td><td><code>getShareStats</code></td><td>Returns the approximate size of the data stored on a file share, rounded up to the nearest gibibyte. Returns an XML ShareStats document.</td></tr><tr><td>Lease File</td><td><code>leaseFile</code></td><td>Manages a lock on a file for write and delete operations. Supports the acquire, change, release and break lease actions. File leases are always infinite, so leaseDuration must be -1 on acquire; Azure Engine limitation: the lease identifier is returned only in the x-ms-lease-id response header, which this engine does not surface, so an acquired lease id must be supplied by the caller rather than read from this action's output.</td></tr><tr><td>Lease Share</td><td><code>leaseShare</code></td><td>Manages a lock on a file share to prevent it being deleted. Supports the acquire, renew, change, release and break lease actions. Engine limitation: the lease identifier is returned only in the x-ms-lease-id response header, which this engine does not surface, so an acquired lease id must be supplied by the caller rather than read from this action's output.</td></tr><tr><td>List Directories And Files</td><td><code>listDirectoriesAndFiles</code></td><td>Returns the directories and files under the specified share or directory. Pass an empty directoryPath to list the share root. Engine limitation: the request builder percent-encodes a forward slash inside a path input to %2F, so directoryPath must be a single directory name; nested paths such as parent/child cannot be enumerated.</td></tr><tr><td>List Directory Handles</td><td><code>listDirectoryHandles</code></td><td>Returns the open SMB handles on a directory, and optionally on everything beneath it. Returns an XML EnumerationResults document listing each handle with its HandleId, Path, ClientIp and OpenTime.</td></tr><tr><td>List File Handles</td><td><code>listFileHandles</code></td><td>Returns the open SMB handles on a file. Returns an XML EnumerationResults document listing each handle with its HandleId, Path, ClientIp and OpenTime.</td></tr><tr><td>List Ranges</td><td><code>listRanges</code></td><td>Returns the list of valid byte ranges that contain data for a file. Optionally diffs against a share snapshot to return only the ranges that changed. Returns an XML Ranges document.</td></tr><tr><td>List Shares</td><td><code>listShares</code></td><td>Returns a list of the file shares and share snapshots under the specified Azure Storage account. Returns an XML EnumerationResults document.</td></tr><tr><td>Put Range</td><td><code>putRange</code></td><td>Writes content into a byte range of an existing file, or clears a range. The file must already exist and be large enough; create it first with Create File. Engine limitation: request bodies are UTF-8 encoded, so binary content is corrupted and only text content can be written reliably.</td></tr><tr><td>Put Range From URL</td><td><code>putRangeFromUrl</code></td><td>Writes a byte range into a file by copying it directly from another file or blob URL, without routing the data through the caller. Avoids the engine's text-only body limitation because the content never passes through the request body.</td></tr><tr><td>Read Symbolic Link</td><td><code>readSymbolicLink</code></td><td>Returns the target path a symbolic link points at. Available only on NFS file shares, which require a premium file storage account. Engine limitation: the target is returned only in the x-ms-link-text response header, which this engine does not surface, so a successful call returns an empty body.</td></tr><tr><td>Rename Directory</td><td><code>renameDirectory</code></td><td>Renames a directory within the same file share. The destination is supplied as the directory to create; the directory's current location is supplied as sourceDirectoryPath, a path relative to the share root. sourceDirectoryPath is sent inside a header URI rather than as a URL segment, so it may contain forward slashes and address a nested directory.</td></tr><tr><td>Rename File</td><td><code>renameFile</code></td><td>Renames a file within the same file share. The destination is supplied as the directory and file name to create; the file's current location is supplied as sourceFilePath, a full path relative to the share root. sourceFilePath is sent as a header rather than a URL segment, so unlike the URL path inputs it may contain forward slashes and address a nested directory.</td></tr><tr><td>Restore Share</td><td><code>restoreShare</code></td><td>Restores a previously soft-deleted file share. Requires share soft-delete retention to be enabled on the storage account, and the deleted share's name and version, which are obtained from List Shares with include set to deleted.</td></tr><tr><td>Set Directory Metadata</td><td><code>setDirectoryMetadata</code></td><td>Sets one user-defined metadata name-value pair on a directory. Engine limitation: metadata is carried in dynamically-named x-ms-meta-{name} headers which the templating layer cannot generate, so this action exposes a single fixed header x-ms-meta-value; calling it replaces all existing metadata on the directory.</td></tr><tr><td>Set Directory Properties</td><td><code>setDirectoryProperties</code></td><td>Sets the SMB system properties of a directory, including its file system attributes, creation and last write timestamps, and security descriptor.</td></tr><tr><td>Set File Metadata</td><td><code>setFileMetadata</code></td><td>Sets one user-defined metadata name-value pair on a file. Engine limitation: metadata is carried in dynamically-named x-ms-meta-{name} headers which the templating layer cannot generate, so this action exposes a single fixed header x-ms-meta-value; calling it replaces all existing metadata on the file.</td></tr><tr><td>Set File Properties</td><td><code>setFileProperties</code></td><td>Sets the system properties of a file, including its HTTP content headers, SMB attributes and timestamps, and can resize the file. Shrinking a file with contentLength truncates and discards the bytes beyond the new size.</td></tr><tr><td>Set File Service Properties</td><td><code>setFileServiceProperties</code></td><td>Sets the properties of the File service on a storage account, controlling hour metrics and the share soft-delete retention policy. This rewrites account-wide service configuration and affects every file share in the account. Engine limitation: the templating layer has no loop construct, so CORS rules cannot be expressed and are omitted from the request, which clears any existing CORS configuration.</td></tr><tr><td>Set Share ACL</td><td><code>setShareAcl</code></td><td>Sets a stored access policy on a file share for use with shared access signatures. Engine limitation: the templating layer has no loop construct, so exactly one stored access policy can be set per call; the Azure API accepts up to five and this call replaces all existing policies with the single one supplied.</td></tr><tr><td>Set Share Metadata</td><td><code>setShareMetadata</code></td><td>Sets one user-defined metadata name-value pair on a file share. Engine limitation: metadata is carried in dynamically-named x-ms-meta-{name} headers which the templating layer cannot generate, so this action exposes a single fixed header x-ms-meta-value whose value you supply; calling it replaces all existing metadata on the share.</td></tr><tr><td>Set Share Properties</td><td><code>setShareProperties</code></td><td>Sets the properties of a file share, including its quota in gibibytes and its access tier.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/cloud-devops/azure-file-storage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
