Azure-Storage-Blob Python SDK Linux

AIsignQA 0 Reputation points
2025-02-27T16:03:55.2866667+00:00

I am trying to use the Azure-Storage-Blob Python SDK to upload documents to Azure from a website. If I run the script from Windows everything works as expected. If I run the script from Linux (Ubuntu) the script fails with AutenticationError.

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
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Luciano Valinotti 5 Reputation points
    2025-02-27T16:32:47.07+00:00

    Hello,

    One thing to check is whether the Azure credentials (like the connection string or EntraID authentication) are correctly configured on your Linux system. Ensure that any environment variables or credentials files needed for authentication are properly set up on Ubuntu. Sometimes, differences in how the OS handles environment variables or permissions can cause this issue.

    hope it helps!

    0 comments No comments

  2. Syed Aaqid Ali 580 Reputation points Microsoft External Staff Volunteer Moderator
    2025-02-27T20:59:40.0633333+00:00

    Hi AIsignQA,

    It could be due to differences in the authentication mechanisms or configurations in Linux environments and how your authentication credentials are set up when running the script on Linux compared to Windows.

    Here are some steps you can take to troubleshoot and resolve the issue.

    • Ensure that the authentication credentials (such as account name and account key or SAS token) used in the script are correct and valid for the Azure Storage account.
    • Make sure that all necessary dependencies and libraries required by the Azure-Storage-Blob SDK are installed on the Linux machine. Check for any missing packages that could be causing authentication errors.
    • Verify that the credentials are being passed correctly in the Linux environment and there are no typos or formatting issues. Ensure that the necessary environment variables are set on your Linux machine.
    • Check if there are any proxy settings or network configurations on the Linux machine that might be affecting the authentication process. Ensure that the Linux environment has access to the Azure services and endpoints.
    • Ensure that you are using the latest version of the Azure-Storage-Blob Python SDK that is compatible with both Linux environments. Update the SDK if needed to address any compatibility issues.
    • Add debug statements or logging to your Python script to capture more details about the authentication process and any errors that occur.

    Reference:

    Kindly let me know if these steps help you to resolve the AuthenticationError when running script on Ubuntu. Should you continue to experience any issues, please don't hesitate to provide additional details so that we may assist you further.


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

    If you have any other questions or are still running into more issues, let me know in the "comments" and I would be happy to help you.

    0 comments No comments

  3. AIsignQA 0 Reputation points
    2025-02-28T19:59:08.1+00:00

    authenticationerrordetail:The MAC signature found in the HTTP request 'REDACTED' is not the same as any computed signature. Server used following string to sign: 'PUT


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.