title: How to get a Shared Access Signature on a Blob using the latest Azure SDK .NET API v12?
body: <p>I used to be able to create a shared access signature on a Blob using the v11 Azure SDK API, like this:</p>
  
  <pre><code>var containerName = "mycontainer";
  var blobName = "myblob";
  
  CloudStorageAccount storageAccount 
   = CloudStorageAccount.Parse(&lt;StorageConnectionString&gt;);
  
  CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
  
  CloudBlobContainer container = blobClient.GetContainerReference(containerName);
  
  
  SharedAccessBlobPermissions permission = SharedAccessBlobPermissions.Read;
  
  TimeSpan clockSkew = TimeSpan.FromMinutes(15d);
  TimeSpan accessDuration = TimeSpan.FromMinutes(15d);
  
  var blobSAS = new SharedAccessBlobPolicy
  {
      SharedAccessStartTime = DateTime.UtcNow.Subtract(clockSkew),
      SharedAccessExpiryTime = DateTime.UtcNow.Add(accessDuration) + clockSkew,
      Permissions = permissions
  };
  
  CloudBlockBlob blob = container.GetBlockBlobReference(blobName);
  
  string sasBlobToken = blob.GetSharedAccessSignature(blobSAS);
  
  ...
  </code></pre>
  
  <p>I want to use the latest v12 .NET API which seems to replace <code>CloudBlobClient</code> by <code>BlobServiceClient</code>, <code>CloudBlobContainer</code> by <code>BlobContainerClient</code> and <code>CloudBlockBlob</code> by <code>BlobClient</code>. </p>
  
  <p>However the method <code>GetSharedAccessSignature</code> that is available on a <code>CloudBlockBlob</code> instance is not available on a <code>BlobClient</code> instance.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How to get a shared access signature from a <code>BlobClient</code> instance using the latest Azure SDK .NET API v12?</p>