title: Azure SAS and Permission
body: <p><strong>GetSaSForBlobContainer</strong>(container,SharedAccessBlobPermissions.List|SharedAccessBlobPermissions.Read);</p>
  
  <pre><code>public static string **GetSaSForBlobContainer**(CloudBlobContainer blobContainer, SharedAccessBlobPermissions permission)
      {
          var sas = blobContainer.GetSharedAccessSignature(new SharedAccessBlobPolicy()
          {
              Permissions = permission,
              SharedAccessStartTime = DateTime.UtcNow.AddMinutes(-5),//SAS Start time is back by 5 minutes to take clock skewness into consideration
              SharedAccessExpiryTime = DateTime.UtcNow.AddMinutes(15),
          });
          return string.Format(CultureInfo.InvariantCulture, "{0}{1}", blobContainer.Uri, sas);
      }
  </code></pre>
  
  <p>-- When I try this, my container access in my stroge account is private.Can I list blobs in the container with Internet Explorer ? I try with blob and container access types the fail is always : </p>
  
  <blockquote>
    <p>
    <Code>AuthenticationFailed</Code>
    
    Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:2c504f81-0001-00ea-3815-be7271000000 Time:2017-04-25T22:47:20.9382490Z
    
    
    Signature did not match. String to sign used was rl 2017-04-25T22:38:15Z 2017-04-25T22:58:15Z /blob/onlineeducation/$root 2015-12-11
    
    </p>
  </blockquote>
  
  <p>But when I try this I can see the blobs  ,</p>
  
  <pre><code> foreach (IListBlobItem blob in blobs)
  {
     CloudBlockBlob blob1 = new CloudBlockBlob(blob.Uri);
     string name = blob1.Name;
  
  }
  </code></pre>
  
  <p>1-)  I dont understand one thing when I create GetSaSForBlobContainer and my container access type is private what will happen (for Internet Explorer and code) ?.</p>
  
  <p>2-) When I get reference without permission my private container, and then create blob uri + SAS.Example what will happen can I see my containers ? or can I only write referenced blob (my blob permission is only write)..</p>
  
  <p>3-What will happen, Container uri + sas - Blob uri + sas (Permission is read) => Can I only upload the file or can I see the containers when try in Internet Explorer .</p>
  
  <p>4-)What is the different here ,</p>
  
  <ul>
  <li><p>My container access type is <strong>private</strong> in my storage I get the reference of continer <em>without any permssion and SAS</em>,  and then create blob URI with r<em>ead permssion and SAS</em> .  </p></li>
  <li><p>Container acces type is <strong>private</strong> in my storage I get the reference of container <em>with permssion and SAS</em>, and then create blob URI with <em>read permssion and SAS</em> </p></li>
  </ul>