I am embeding power bi reports on my website using APPS OWNED DATA.
Steps which I have followed is
1. Get Access token - Using https://login.microsoftonline.com/common/oauth2/token REST API
2. Get Embed token - Using https://api.powerbi.com/v1.0/myorg/groups/<id>/reports/<id>/GenerateToken
After getting embed token rest everything works as expected.
Uncaught ReferenceError: generateEmbedToken is not defined
Thanks in advance.
Where did you put the refresh token example in your code?
As the document statys, the generateEmbedToken is a function you need to implement with.
Basically, the generateEmbedToken should follow the scenario of the GenerateToken function, and you need to get the AccessToken first:
I haven't found any code sample for that.