The ability to create a Shared Access Signature in File Service Share announced in the latest version of the REST API. You must use Storage Client Library 5.0.0 for this purpose.
First install this library from Nuget :
WindowsAzure.Storage -Version 5.0.0 Installation Package
Then the process of creating SAS in the file service sharing is very similar to creating SAS in the blob container. See the sample code below:
static void FileShareSas() { var account = new CloudStorageAccount(new StorageCredentials(accountName, accountKey), true); var fileClient = account.CreateCloudFileClient(); var share = fileClient.GetShareReference("share"); var sasToken = share.GetSharedAccessSignature(new Microsoft.WindowsAzure.Storage.File.SharedAccessFilePolicy() { Permissions = Microsoft.WindowsAzure.Storage.File.SharedAccessFilePermissions.List, SharedAccessExpiryTime = new DateTimeOffset(DateTime.UtcNow.AddDays(1)) }); }
In the above code, we create SAS with List permission, which expires one day from the current date / time (in UTC format).
Also, if you are looking for a tool for this, I can suggest you take a look at Cloud Portam (Disclosure: I am creating this tool). We recently released SAS management functionality in Share .
source share