Generated SAS Authorization failure

Kid 1 Reputation point
2022-11-19T21:32:37.297+00:00

I am new to azure and just created an account on azure portal.

I am trying out the example for authorizing with SAS here

https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-dotnet-get-started

I am receiving the error:-

Azure.RequestFailedException: 'This request is not authorized to perform this operation.

This is how my options are like when generating SAS

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 42,486 Reputation points
    2022-11-19T23:48:11.64+00:00

    Hi,

    This error seems to me like a Permissions issue or Network related, check the steps here with the fix with regards to the rules.

    Hope this helps.
    JS

    ==
    Please Accept the answer if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. Sumarigo-MSFT 47,466 Reputation points Microsoft Employee Moderator
    2022-11-21T05:33:31.56+00:00

    @Kid Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    When exactly are you getting this error code? Can you share the complete error message?

    Based on your error, please refer to the SAS error codes : https://learn.microsoft.com/en-us/rest/api/storageservices/sas-error-codes

    The most easiest way to generate the SAS token through Azure Storage Explorer tool. You cab generate the SAS token at the Storage account level and also container/ file level.

    262375-image.png

    Create SAS tokens for your Azure storage

    Cause 2 You can also check your firewall rules for the Storage account

    Storage accounts > {yourAccount} > Networking > Firewalls and Virtual networks and add your IP address

    Additional information: Can you please refer to this article: How a shared access signature works

    If you have any additional questions or need further clarification, please let me know.

    ----------

    Please do not forget to 262397-accept-answer.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.