Azure File Share Access Issue: Unauthorized Request Error with SAS URL

86107085 20 Reputation points
2025-09-24T12:55:11.79+00:00

I have an Azure File Share that is accessed using Storage Explorer and a SAS URL. Initially, it works smoothly for browsing and uploading files, but then I start encountering the following error randomly:

This request is not authorized to perform this operation. RequestId XXXXXXXXXXXXXXXXX

At this point, I prefer not to switch to Entra ID authentication and want to continue using SAS for now.

What potential issues should be investigated to resolve this error?

Azure Files
Azure Files

An Azure service that offers file shares in the cloud.


Answer accepted by question author
Anonymous
2025-09-24T13:26:51.2166667+00:00

Hello @86107085,

Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

I understand your question about the error “This request is not authorized to perform this operation” when using a SAS URL to access Azure File Shares. This usually means that the SAS token is either invalid, expired, or does not have the necessary permissions for the operation. Here are some important points to check:

  1. SAS Token Validity: Please check if the SAS token is still valid at the time the error occurs. Since SAS tokens are time-limited, any request made after they expire will not work. Also, make sure the client machine's clock is set correctly to UTC, as a time mismatch can make SAS tokens seem expired earlier than they actually are.
  2. Permissions on the SAS: Make sure the SAS token has the appropriate permissions, such as r for read, w for write, l for list, and d for delete. If you experience intermittent issues with browsing or uploading, confirm that the SAS includes both list and write permissions.
  3. Scope of the SAS: Ensure the SAS is assigned to the correct resource type, whether that's service, container/share, or object/file level. Remember, a file-level SAS doesn't allow directory browsing, while a share-level SAS does.
  4. Storage Account Settings: If you are using a Storage account firewall or network restrictions, make sure the client's IP address is permitted. Also, check if shared key access or SAS tokens are disabled at the account level.
  5. Token Regeneration and Rotation: If the SAS was created with a Stored Access Policy, check to ensure the policy hasn't been changed or removed. You may also want to regenerate the SAS and test with a new token to eliminate the possibility of token corruption or policy updates.

Please refer below link for more information: Grant limited access to data with shared access signatures (SAS) - Azure Storage | Microsoft Learn

Next Action: Check your current SAS token to confirm its expiry, scope, and permissions. If needed, generate a new SAS from Azure Portal or CLI with the necessary permissions and test again. If the problem continues, record the failing request’s RequestId and Timestamp from the error message, these details can help with further analysis in the Azure Storage logs.

Since you prefer to use SAS, concentrating on the checks mentioned above should help identify and resolve the occasional authorization errors.

Kindly let us know if the above helps or you need further assistance on this issue.

Please do not forget to "Accept the answer” and “up-vote it” wherever the information provided helps you, this can be beneficial to other community members__.__ It would be greatly appreciated and helpful to others.

Was this answer helpful?


Answer recommended by moderator
86107085 20 Reputation points
2025-10-03T16:24:17.15+00:00

Hi Jeevan

I think my problem was that the current firewall rule on the storage account doesn't allow traffic originating from my IP addresse which is behind a proxy.

After identifying the proxy IP , I updated the rules and now it's working.

Thank you for your support

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. 86107085 20 Reputation points
    2025-09-30T12:19:59.86+00:00

    Hello Jeevan

    Sorry for my late reply.

    I have review and check all the recommandations in your comments but , i am still getting the authorization error:

    I checked the azcopy logfile and found this:

    ###########

    2025/09/29 14:45:10 ==> REQUEST/RESPONSE (Try=1/99.8344ms, OpTime=178.3346ms) -- RESPONSE STATUS CODE ERROR

    DELETE https://SA.file.core.windows.net/.... REDACTED ...2F0C9A8095.JPG?se=2025sig=-REDACTED-.....

    Accept: application/xml

    User-Agent: AzCopy/10.29.1 azsdk-go-azfile/v1.3.0 (go1.24.2; Windows_NT)

    X-Ms-Client-Request-Id: daebdb7a-c181-44bc-4c04-ed55e53c40a8

    x-ms-allow-trailing-dot: true

    x-ms-version: 2023-08-03


    RESPONSE Status: 403 This request is not authorized to perform this operation.

    Content-Length: 246

    Content-Type: application/xml

    Date: Mon, 29 Sep 2025 14:45:10 GMT

    Server: Microsoft-HTTPAPI/2.0

    X-Ms-Client-Request-Id: daebdb7a-c181-44bc-4c04-ed55e53c40a8

    X-Ms-Error-Code: AuthorizationFailure

    X-Ms-Request-Id: 4ce6f9ea-f01a-0016-0a4f-3130ae000000

    Response Details: <Code>AuthorizationFailure</Code><Message>This request is not authorized to perform this operation. </Message>

    2025/09/29 14:45:10 ERR: [P#0-T#68] error deleting the (incomplete) file https://SA.file.core.windows.net/.... REDACTED ...2F0C9A8095.JPG?se=2025sig=-REDACTED-...... Failed with error DELETE https://SA.file.core.windows.net/.... REDACTED ...2F0C9A8095.JPG?se=2025sig=-REDACTED-.....


    ########

    It looks like azcopy want to delete some incomplete file but does not have the right.

    Below are the settings and rights of the SASimage Tell me if you have an idea of what is preventing azcopy to delete incomplete files.

    Thank you

    Was this answer helpful?


Your answer

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