Skip to content

Latest commit

 

History

History
37 lines (20 loc) · 1.26 KB

README.md

File metadata and controls

37 lines (20 loc) · 1.26 KB

Embed a Report using Service Principal in React App

Set Up Application

Create an Azure AD app and enable app's service principal to your workspace. Refer to Embed Content using Service Principal

Follow the Embed Content for your Customers

Generate a Embed Token from Azure portal

Create a HTTP Trigger Function in Azure. Refer to Create your first function in the Azure portal

After the function created, Go to Code + Test and paste the code from GenerateToken.csx

Enter the details and Click on Test/Run. You will get HTTP response with EmbedToken, Embed URL.

Click on the Get function URL and copy the function URL

Demo App

Embeded the Report using powerbi-client-react-npm library and the sample code from powerbi-client-react-github

Paste the Function URL in App.tsx

Install the Dependencies

npm i

Run the Demo App

npm run demo