Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Is there any way to embed power bi report without using Azure AD

Hi,

I am not sure I am in the right channel to ask question, please advise if I am in the wrong channel, thanks.

My background is that I am learning how to embed Power BI report in my React web applicaiton, and I try to use this node package "powerbi-client-react" in my application to embed report, and I try to find any solutions for this config param "accessToken", and almost all the experts in Youtube videos said that they use Azure AD for the identity authentication, I want to know is there a way for my project to embed report without using Azure AD.

 

For accessToken, I copy it manually by chrome console script copy(powerBIAccessToken) in powerbi.com workspace.

and I try to use this api to get embedUrl and token but always response me 403 code

My code FYI:

 

import React from 'react';
import { PowerBIEmbed } from 'powerbi-client-react';
import { models } from 'powerbi-client';

const Dashboard = () => {
  const embedConfig = {
    type: 'report',
    id: '964645...b0a41f8',
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=9646...0a41f8&groupId=8f7802...857d103&w=2&config=eyJjbH..X19',
    accessToken: 'eyJ0eXAiOiJKV1Q...hwKuQ', 
    tokenType: models.TokenType.Embed,
    settings: {
      panes: {
        filters: {
          expanded: false,
          visible: true
        }
      },
      background: models.BackgroundType.Transparent,
    }
  };

  const eventHandlers = new Map([
    ['loaded', function () { console.log('====Report loaded'); }],
    ['rendered', function () { console.log('====Report rendered'); }],
    ['error', function (event) { console.log(event.detail); }]
  ]);

  const getEmbeddedComponent = (embeddedReport) => {
    window.report = embeddedReport;
  };


  return(
    <PowerBIEmbed
      embedConfig={embedConfig}
      cssClassName = { "report-style-class" }
      eventHandlers = { eventHandlers }
      getEmbeddedComponent = { getEmbeddedComponent }
    />
  );

};

export default Dashboard;

 

 

 

 

 
 

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

You can refer the following official documentation to embed Power BI item into React application:

Bootstrap a component

embedConfig = {
    {
        type: 'report', // Supported types: report, dashboard, tile, visual, and qna.
        id: undefined,
        embedUrl: undefined,
        accessToken: undefined, // Keep as an empty string, null, or undefined.
        tokenType: models.TokenType.Embed
    }
}

Best Regards

Anonymous
Not applicable

Hi Rena, thanks for your answer, but the code snippet you pasted here is just a demostrate. but I want to know how to get all the params of embedConfig, especially accessToken, I dont want to get this from Azure AD, I want to get it in another way.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.