Can Azure Maps static image API support sas token added as request parameter instead of header.

Tongchen Gu 0 Reputation points Microsoft Employee
2025-11-17T10:12:57.94+00:00

We’re using a SAS token to authenticate Azure Maps API calls. However, the Static Image API cannot be used as the src of an <img> element because it requires authentication headers. Is it possible to include the SAS token in the request URL parameters so that we can render the image directly using an <img> element ?

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

2 answers

Sort by: Most helpful
  1. Anshika Varshney 3,795 Reputation points Microsoft External Staff Moderator
    2025-11-18T11:00:05.02+00:00

    Hi Tongchen Gu ,
    Yes you can use a SAS token to authenticate requests to the Azure Maps Static Image API. Just make sure to generate the SAS token properly (with correct permissions, rate limit, and allowed regions), and send it in the Authorization header as jwt-sas <token>.
    Please let me know if there are any remaining questions or additional details, I can help with, I’ll be glad to provide further clarification or guidance.

    Thankyou!

    1 person found this answer helpful.

  2. Q&A Assist
    2025-11-17T10:13:08.2833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The Azure Maps Static Image API requires authentication headers, specifically the Authorization header with the SAS token, and does not support including the SAS token as a request parameter in the URL. Therefore, you cannot use the Static Image API as the src of an <img> element directly without including the required authentication headers. This means that rendering the image directly in an <img> tag with a SAS token in the URL parameters is not possible.


    References:

    0 comments No comments

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.