Forum Discussion
Get token of report
- 7 years ago
Hi Yerkhan,
Regarding the error, please refer to #grant-admin-consent-to-enterprise-apps-in-the-azure-portal for a solution. Please also refer to the snapshot below.
In order to get the embed token, we need to get a valid access token first, then invoke the REST API with it to get the embed token. Please refer to the snapshots below.
1. Get an access token.
POST https://login.microsoftonline.com/replace_with_your_tenant_id/oauth2/token
resource: https://analysis.windows.net/powerbi/api2. Invoke the "generate embed token" API.
If there aren't any roles, you don't need to specify the identities.
Best Regards,
Dale
Hi NEbdf,
All seems good. If it's a web app, the client_secret is needed. But the error message shouldn't be this one.
If I use a wrong password, I got the same error message. I would suggest you check the username and password again though it sounds impossible. Maybe you have multi-tenant?
Best Regards,
Dale
Hi v-jiascu-msft
the app in Azure is configured as a native app. Seems to be the default when using the PowerBI configurator. Should PowerBI embed also work when its a Web-App/API?
Edit:
Just tested everything with seting up a Web-App/API and delivering the app secret. Same error message as before unfortunately.
- v-jiascu-msft7 years agoMicrosoft Employee
Hi NEbdf,
That's too weird. I would suggest you file a support ticket here. I will appreciate it if you can share the cause and the solution.
Best Regards,
Dale