Accounts - List Keys

Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listKeys?api-version=2018-05-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

The name of the Azure Resource Group.

accountName
path True
  • string

The name of the Maps Account.

api-version
query True
  • string

Client Api Version.

Responses

Name Type Description
200 OK

The request was successful.

404 Not Found

The specified Account does not exist.

Other Status Codes

An unexpected error occurred.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ListKeys

Sample Request

POST https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount/listKeys?api-version=2018-05-01

Sample Response

{
  "id": "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount",
  "primaryKey": "ZiBllKWCwXXLTO13S2TaoHoK8kPFYaoyYlAcnCcE4PQ",
  "secondaryKey": "cJHpmUGNaGGO8H59p6NKGhfff9VjD278-2bi5wo0_mU"
}

Definitions

Details

If available, a list of additional details about the error.

Error

This object is returned when an error occurs in the Maps API

MapsAccountKeys

The set of keys which can be used to access the Maps REST APIs. Two keys are provided for key rotation without interruption.

Details

If available, a list of additional details about the error.

Name Type Description
code
  • string

Error code.

message
  • string

If available, a human readable description of the error.

target
  • string

If available, the component generating the error.

Error

This object is returned when an error occurs in the Maps API

Name Type Description
code
  • string

Error code.

details

If available, a list of additional details about the error.

message
  • string

If available, a human readable description of the error.

target
  • string

If available, the component generating the error.

MapsAccountKeys

The set of keys which can be used to access the Maps REST APIs. Two keys are provided for key rotation without interruption.

Name Type Description
id
  • string

The full Azure resource identifier of the Maps Account.

primaryKey
  • string

The primary key for accessing the Maps REST APIs.

secondaryKey
  • string

The secondary key for accessing the Maps REST APIs.