Authenticating with a trial subscription of Azure Maps.

Grant Gussie 1 Reputation point
2026-04-20T21:09:54.74+00:00

I am trying to update my BingMaps window application and have a trial subscription to Azure.

I am trying to get an authentication key, using the procedure in

https://learn.microsoft.com/en-us/azure/azure-maps/how-to-manage-authentication

but it simply doesn't work.
Is there a walkthrough on how to get a trial Azure maps authentication key? The getting started videos I have found are no help, they just say all the wonderful things it can do, not how to do it.

Azure Maps
Azure Maps

An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.


2 answers

Sort by: Most helpful
  1. Anshika Varshney 15,115 Reputation points Microsoft External Staff Moderator
    2026-04-21T11:00:35.9866667+00:00

    Hi Grant Gussie,

    Thanks for sharing your issue, this is a common situation when using a trial subscription.

    To use Azure Maps with a trial Azure subscription and get your authentication key, you need to first set up an Azure Maps resource. The subscription alone is not enough; the Maps account must exist.

    Start by signing in to the Azure portal. Go to “Create a resource”, search for “Azure Maps”, and create a new account (for example, using Gen2 and a suitable pricing tier). This step is required even if you are using a free or trial subscription.

    Once the account is created, go to “All resources” in the portal and open your Azure Maps account.

    Inside the resource, navigate to “Authentication” under the Settings section. Here you will find the Primary Key and Secondary Key. Copy the Primary Key, as this will act as your subscription key for calling Azure Maps APIs.

    You can then use this key in your application. For example, in REST API calls, you pass it as the subscription-key parameter. Similarly, SDKs in JavaScript or .NET use this key through AzureKeyCredential.

    If you are unable to see the Authentication section or keys, first confirm that the Azure Maps resource was created successfully. If it is missing or not working properly, it may help to recreate the Maps account.

    For production scenarios, Microsoft Entra ID authentication is recommended, but for testing or migrating from Bing Maps, using the shared subscription key is the quickest approach.

    If everything looks correct, try a simple test call with your key and endpoint to confirm basic connectivity.

    I Hope this helps. Do let me know if you have any further queries.

    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thankyou!

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-04-20T21:10:06.9866667+00:00

    To use Azure Maps on a trial Azure subscription and get an authentication key, first ensure an Azure Maps account is created, then retrieve the subscription key from that account.

    Follow these steps end to end:

    1. Create an Azure Maps account
      1. Sign in to the Azure portal.
      2. If not already done, create an Azure Maps account:
        • Go to Create a resource → search for Azure Maps → create an account (for example, kind "Gen2" and an appropriate SKU).
        • This step is required even if the Azure subscription itself is in free/trial mode.
    2. Open the Azure Maps account
      1. In the Azure portal, select All resources.
      2. Select the Azure Maps account that was created.
    3. Get the subscription key (Shared Key authentication)
      1. In the left pane of the Maps account, under Settings, select Authentication.
      2. Under Shared Key authentication, locate Primary Key and Secondary Key.
      3. Copy the Primary Key. This is the subscription key used by your application.
      This key is what Bing Maps applications typically expect as an API key equivalent when calling Azure Maps REST APIs or SDKs. For example, with REST calls:
         https://atlas.microsoft.com/map/tile?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=2024-04-01&tilesetId=microsoft.base.road&zoom=15&x=5236&y=12665&tileSize=256
      
    4. Use the key in an application (example)
      • For a simple JavaScript/TypeScript app using the Azure Maps REST SDK:
             MAPS_SUBSCRIPTION_KEY="<subscription-key>"
        
             const MapsSearch = require("@azure-rest/maps-search").default;
             const { AzureKeyCredential } = require("@azure/core-auth");
             require("dotenv").config();
             
             const credential = new AzureKeyCredential(process.env.MAPS_SUBSCRIPTION_KEY);
             const client = MapsSearch(credential);
        
      • For .NET (Geolocation client example):
             AzureKeyCredential credential = new AzureKeyCredential("<My Subscription Key>");
             MapsGeolocationClient client = new MapsGeolocationClient(credential);
        
    5. If the Authentication blade “doesn’t work”
      • Confirm that the Azure Maps account was actually created (step 1). The subscription alone is not enough; the Maps resource must exist.
      • Open All resources and verify the Maps account is listed and selectable.
      • Once inside that resource, the Authentication blade is where the keys appear; if it is empty or missing, the Maps account may not have been created correctly and should be recreated.

    For production, Microsoft Entra ID authentication is recommended, but for a trial and for updating an existing Bing Maps application, Shared Key (subscription key) is the simplest path.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.