Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

311
Views
Unauthorized access to Azure Maps using anonymous authentication type

I am trying to secure my SPA application against obtaining API keys for not authorized users. First of all, I have created Azure Maps in portal and assigned registration app from Azure Active Directory to be an owner for all Azure Maps actions. After that, I achieved token from C# client using AzureTokenServiceProvider class:

    var azureServiceTokenProvider = new AzureServiceTokenProvider("RunAs=App;AppId={AppId};TenantId={TenantId};AppKey={AppKey}");
    var token = await azureServiceTokenProvider.GetAccessTokenAsync("https://atlas.microsoft.com");

Token obtained from server was used to client-side rendered map:

{
   "authOptions":{
      "authType": AuthenticationType.anonymous,
      "clientId":"{clientId}",
      "getToken": (resolve) => resolve('ey...') 
   }
}

Map using this authentication type is not rendering, because in network tab there is an response with 403 status code with body:

"Provided principal ID '{...}' was NotAllowed access with Azure Role Based Access Control. Confirm access at {...}. "target": "Microsoft.Maps/accounts/services/render/read"".

I'm not sure if my configuration is correct, but I thought that access token achieved for registration app related with Azure Maps should be enough for render map this way.

What should I do to generate token which might be used in getToken method in client-side?

Thanks in advance for any answer.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!