Hello salman,
Greetings! Welcome to Microsoft Q&A Platform.
I understand that you are trying to upload files in Azure blob storage, by calling Azure blob storage rest API and you are encountering an error "400 InvalidAuthenticationInfo" - the error message states "that Authentication information is not given in the correct format. Check the value of Authorization header"
This type of error usually occurs due to one of the following reasons below and hence please consider checking that to resolve the issue,
- The error information tells that it is due to Authentication information is not given in the correct format Make sure the Authorization header is formatted correctly according to the requirements of the Azure Blob Storage REST API refer: https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-error-codes.
- The uploading file size might be greater than the original size of the blob storage, hence verify the size.
- The copy of the source and destination account must be the same and the specified blob content should be valid with blob tier.
- Ensure the date and time in the request header are in the correct format. Azure requires the x-ms-date. Check whether any of the key you might be using may not be rotated or expired.
- Make sure your connection string has all the necessary information.
- Please ensure the service account has the necessary permissions to access the Blob Storage.
- Azure Storage Accounts can have network rules applied to them, restricting access to certain IPs or VNETs. If your Azure Storage Account has firewall rules set up, ensure your environment's outbound connections are allowed to reach the Storage Account.
- Ensure that the system clock on your client machine is synchronized with a reliable time source. Azure Storage requires that the request time be within 15 minutes of the server time.
refer - https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-error-codes.
Similar thread for reference: https://stackoverflow.com/questions/73858529/invalid-authentication-info-error-when-using-azure-ad-and-azure-storage-put-api,https://stackoverflow.com/questions/66600146/invalidauthenticationinfo-error-while-uploading-dcument-in-azure-blob-storage.
Hope this answer helps! please let us know if you have any further queries. I’m happy to assist you further.
Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.