cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Unable to get embed token for embeding reports

Hi, I have been finding issues in generating the embed token for javascript embeding of report. I have registered an app on Azure portal and got Client id and secret but unable to figure out what to do do next in order to get Embed token.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Unable to get Embed token for javascript report embeding


@pragati2405 wrote:

Hi, I have been finding issues in generating the embed token for javascript embeding of report. I have registered an app on Azure portal and got Client id and secret but unable to figure out what to do do next in order to get Embed token.


@pragati2405

To get the embed token, you can reference the code in redirect.aspx.cs in the lib Users Owns Data in Github. You can download the whole C# project and open it in Visual Studio to play and test.

 

Alternatively in other language, you can call a POST API as below.

POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

client_secret={your client secret}&client_id={your client id}&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username={your Power BI account}&password={your Power BI password}

 

View solution in original post

5 REPLIES 5
Highlighted
New Member

How can I get my Embed token for report embed using javascript.

 I registered an app on Azure portal and got the client id and secret but cannot figure out how to get the Embed token.

Highlighted
New Member

Unable to get Embed token for javascript report embeding

Hi, I have been finding issues in generating the embed token for javascript embeding of report. I have registered an app on Azure portal and got Client id and secret but unable to figure out what to do do next in order to get Embed token.

Highlighted
New Member

Unable to get Embed token for javascript report embeding

Hi, I have been finding issues in generating the embed token for javascript embeding of report. I have registered an app on Azure portal and got Client id and secret but unable to figure out what to do do next in order to get Embed token.

Highlighted
Power BI Team
Power BI Team

Re: Unable to get embed token for embeding reports

It sounds like you are trying to embed from the Power BI service, this forum is specific to Power BI On-Prem. You can post your question to the Power BI developer forum here:

 

https://community.powerbi.com/t5/Developer/bd-p/Developer

 

They should be able to point you in the right direction.

Highlighted
Microsoft
Microsoft

Re: Unable to get Embed token for javascript report embeding


@pragati2405 wrote:

Hi, I have been finding issues in generating the embed token for javascript embeding of report. I have registered an app on Azure portal and got Client id and secret but unable to figure out what to do do next in order to get Embed token.


@pragati2405

To get the embed token, you can reference the code in redirect.aspx.cs in the lib Users Owns Data in Github. You can download the whole C# project and open it in Visual Studio to play and test.

 

Alternatively in other language, you can call a POST API as below.

POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

client_secret={your client secret}&client_id={your client id}&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username={your Power BI account}&password={your Power BI password}

 

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021