How to fix MAC signature found in the HTTP request is not the same as the computed signature. Server used following string to sign , in cosmosdb after key rotation

Adrian Wreyford 25 Reputation points
2024-03-30T03:45:24.0533333+00:00

I rotated all the keys at once in the keys plane on the portal.
(All older than 470 days).

After that getting: Message: {"Errors":["The MAC signature found in the HTTP request is not the same as the computed signature. Server used following string to sign - 'get\ndocs\ndbs/xx/colls/user/docs/xx\nsat, 30 mar 2024 03:20:28 gmt\n\n'. Learn more: https://aka.ms/cosmosdb-tsg-mac-signature"]

I have waited more than 12 hours.

Problems
1). My iot hub message routes no longer delivering data to cosmosdb endpoints.

2). The data explorer in the portal is giving the above error.

Is there any way to fix this?

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
479 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,432 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amira Bedhiafi 14,481 Reputation points
    2024-03-30T11:34:54.11+00:00

    I think this issue happens when the authorization signature is incorrect.

    Check this step-by-step blog : https://techcommunity.microsoft.com/t5/azure-paas-blog/the-mac-signature-found-in-the-http-request-xxxx-is-not-the-same/ba-p/3293726

    Also, based on this old thread : https://stackoverflow.com/questions/30465420/the-mac-signature-found-in-the-http-request-is-not-the-same-as-any-compute

    Authentication for Azure Storage is not simply a matter of providing the access key (that is not very secure). You need to create a signature string that represents the given request, sign the string with the HMAC-SHA256 algorithm (using your storage key to sign), and encode the result in base 64.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful