tRuEsAtM
tRuEsAtM

Reputation: 3678

How to use Azure Table Service SAS URL generated from the portal?

I am generating SAS from the Azure portal. SAS Generation from Azure Portal

Below is the code, I am using to insert into a table storage.

string SAS = "SAS Token from the portal";
StorageCredentials storagecred = new StorageCredentials(SAS);
var ctc = new CloudTableClient(
                new StorageUri(new Uri(
              "https://{myaccountname}.table.core.windows.net")),storagecred);
var table = ctc.GetTableReference("{tablename}");
table.CreateIfNotExists();

I am getting a table access forbidden error (403). Am I passing any incorrect parameter? My understanding is that after generating the SAS, account credentials are not required. The IP address provided is my private IP.

Upvotes: 2

Views: 1287

Answers (1)

juunas
juunas

Reputation: 58823

You have to use your public-facing IP address, not the private address as that is not what Azure sees. 10.x.x.x addresses are all private addresses, along with a few other blocks like 192.168.x.x.

Upvotes: 2

Related Questions