Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

320
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda