Search code examples
azure-mapsazuremapscontrol

AzureMapsControl - Is "fetch the token..." only if using Entra?


This is for AzureMapsControl.Components which is a wrapper around Azure Maps.

On the setup page it says:

It also needs to fetch the token to send to the requests of the atlas library.

Is that only if you authenticate via Entra and not needed for authenticating with a subscription key? I think it's only for Entra but the styling of the page it's not clear if that part of the Entra part, or a new part for all uses.

Using the subscription key, not using this works fine in my testing. But I worry I might have missed something.


Solution

  • Tokens only apply when using Entra ID. Subscription keys don't generate tokens and are passed around as text. Microsoft generally recommends using subscription keys for development only as they are not secure. Most map platforms use key based authentication, but it has been a well-known security issue for well over a decade since it is pretty easy to sniff them out and use them elsewhere. I have been able to do this with nearly every major map platform when testing this out. Azure Maps made it a priority to ensure a more secure option was available to developers.