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

381
Visualizações
Connect Power BI to Angular App through MSAL

I have been trying this from months and still I did not find any solution on how to authenticate user with PowerBI service along with the Microsoft Authentication using MSAL.

Tried with https://analysis.windows.net/powerbi/api/ this url as well in powerBI endpoint

export const protectedResources = {
    powerBI: {
        endpoint: "https://graph.microsoft.com/.default",
        scopes: ["Report.Read.All"],
    },
    graphMe: {
        endpoint: "https://graph.microsoft.com/v1.0/me",
        scopes: ["User.Read"],
    },
    armTenants: {
        endpoint: "https://management.azure.com/tenants",
        scopes: ["https://management.azure.com/user_impersonation"],
    }
}

Above the scopes code in config and below is the code got from Microsoft documentation which is working perfectly fine for Authenticating user with graph api and able to get user details.

export function MSALInstanceFactory(): IPublicClientApplication {
  return new PublicClientApplication(msalConfig);
}


export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {
  const protectedResourceMap = new Map<string, Array<string>>();

  protectedResourceMap.set(protectedResources.graphMe.endpoint, protectedResources.graphMe.scopes);
  protectedResourceMap.set(protectedResources.armTenants.endpoint, protectedResources.armTenants.scopes);
  protectedResourceMap.set(protectedResources.powerBI.endpoint, protectedResources.powerBI.scopes);

  return {
    interactionType: InteractionType.Redirect,
    protectedResourceMap
  };
}
export function MSALGuardConfigFactory(): MsalGuardConfiguration {
  return {
    interactionType: InteractionType.Redirect,
    authRequest: loginRequest
  };
}

But the Problem is after user gets authenticated still user has to click on additional sign in button inside the iframe in order to again get authenticated with PowerBI.

enter image description here

See the image.

Please provide me a way to authenticate user in one shot just by single login I should be able to login user in both my app and powerBI service.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can find instructions for the Power BI APIs here: https://docs.microsoft.com/rest/api/power-bi/

Note that the Power BI APIs are on https://api.powerbi.com/v1.0/ (not graph.microsoft.com) and scopes will be similar to https://analysis.windows.net/powerbi/api/<scope name>

Follow the instructions to add PowerBI to your application in the Portal, and then you should be able to configure MSAL to acquire tokens with relevant scopes for each PowerBI endpoint you use.

For example:

powerBI: {
        endpoint: "https://api.powerbi.com/v1.0/myorg/reports",
        scopes: ["https://analysis.windows.net/powerbi/api/Report.Read.All"],
    }

about 4 years ago · Juan Pablo Isaza Relatório
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