I have trial Azure account and I have created table under storage. I want to read table using REST API. I am going through document (https://learn.microsoft.com/en-us/rest/api/storageservices/authorization-for-the-azure-storage-services) to prepare authorization header for HTTP request. I am not able to find 'Shared key' form portal, Can any one help?
Follow the steps below to view the storage access keys for an Azure Blob storage account:
Sign in to the Azure dashboard.
In the navigation pane, click on All Resources.
Choose the desired storage account.
Click on the key icon (
) to view the access keys (
) for the storage account.
Note: Each storage account has two storage access keys "so that you can maintain connections using one key while regenerating the other".
To copy a storage access key, click on the Copy icon next to the key you want to copy.
The term access key is synonymous with shared key in Azure lingo.
From Manage storage account access keys documentation article:
When you create a storage account, Azure generates two 512-bit storage account access keys. These keys can be used to authorize access to data in your storage account via Shared Key authorization.
Here is a working sample which creates a file:
https://github.com/mstaples84/azurefileserviceauth.git
It is based on the tutorial:
https://learn.microsoft.com/de-de/azure/storage/common/storage-rest-api-auth but deals with the issues I had when creating a file from the tutorial.
Simply run the Unit Test "CreateFileAsync()" to test it. Make sure to edit the constants set by the Test class to make it work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With