Azure Maps Shared Key authentication is not working?

Rikam Palkar 61 Reputation points MVP
2024-07-15T16:08:57.8433333+00:00

I am following this article: https://learn.microsoft.com/en-us/azure/azure-maps/azure-maps-authentication#shared-key-authentication

and I've a "Shared key" as suggested by article:
And I am trying to hit the URL as mentioned in the article:

https://atlas.microsoft.com/mapData/upload?api-version=1.0&dataFormat=zip&subscription-key={Your-Azure-Maps-Subscription-key}

However I am getting following exception:

{
    "error": {
        "code": "InvalidKey",
        "message": "The provided key was incorrect or the account resource does not exist.",
        "target": "WWW-Authenticate",
        "details": []
    }
}

Highlighted part is the key I am using..User's image

Am I missing any step?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
736 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. rbrundritt 18,681 Reputation points Microsoft Employee
    2024-07-15T16:23:43.8+00:00

    A couple of things to try:

    1. Double check your URL, make sure you didn't accidentally clip off a character at the start of end of key (most common cause of this issue). Also check that there aren't any characters from the placeholder text, like the curly braces.
    2. Try the key with a different service, like one of the search APIs. I see you are trying to use the map data upload API which is part of the Azure Maps Creator platform, and I believe it has more complexities around data access and security. Generally, shared key based auth shouldn't be used with anything that does a "write" operation.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

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.