Forum Discussion

Ward Horsfall's avatar
Ward Horsfall
Copper Contributor
Dec 13, 2021

How to get the Azure Maps (Try it) samples to work?

Hi,

 

I am trying to do some testing with the Azure maps. For all the samples I try using the "try it". I keep getting the error below.  This is inspite of putting my Client ID in the web form: x-ms-client-id

 
Example URL:
 
https://docs.microsoft.com/en-us/rest/api/maps/search/get-search-address#code-try-0
 
 
 
See error below:

 

{
  "error": {
    "code": "Unauthorized",
    "message": "Bearer realm=\"https://atlas.microsoft.com/\", SharedKey realm=\"https://atlas.microsoft.com/\"",
    "target": "WWW-Authenticate",
    "details": []
  }
}

 

 

Request Preview:

GET https://atlas.microsoft.com/search/address/json?api-version=1.0&query=15127%20NE%2024th%20Street%2C%20Redmond%2C%20WA%2098052
X-ms-client-id: ........................

Headers:

access-control-allow-origin: *
access-control-expose-headers: *
content-type: application/json
date: Mon, 13 Dec 2021 12:52:24 GMT
strict-transport-security: max-age=31536000; includeSubDomains
www-authenticate: Bearer realm="https://atlas.microsoft.com/", SharedKey realm="https://atlas.microsoft.com/"
x-cache: CONFIG_NOCACHE
x-content-type-options: nosniff
x-ms-azuremaps-region: West US 2
x-msedge-ref: Ref A: 8A022D472CD04B709A28E6CAAA9C01F2 Ref B: MEL01EDGE1119 Ref C: 2021-12-13T12:52:24Z

Body:

{
  "error": {
    "code": "Unauthorized",
    "message": "Bearer realm=\"https://atlas.microsoft.com/\", SharedKey realm=\"https://atlas.microsoft.com/\"",
    "target": "WWW-Authenticate",
    "details": []
  }
}

 

 

 

Any suggestions on how to make this work?

 

Thanks,

 

ward

Resources