Reputation: 21
Trying to embed Power BI dashboard into our Angular application. The issue is that we're getting the ID token instead of access token. Moreover, there's a cross origin issue as well. If we get the token from postman and embed in a sample web page, it works but when we call it within our application, it doesn't work. It give the following error:
ERROR:
Error: Uncaught (in promise): Object: {"message":"LoadReportFailed","detailedMessage":"Fail to initialize - Could not resolve cluster","errorCode":"403","level":6,"technicalDetails": {"requestId":"cde7a17e-5baa-454c-8e8b-72e5b9f1307e"}}
Any help would be highly appreciated.
Granted all permissions on the app created on azure. Used implicit grant.
Need the access token instead of ID token.
Upvotes: 0
Views: 1568
Reputation: 13460
Accordin the official troubleshooting guide, this error means that "Embed type doesn't match token type". So this probably is a bug in your code. In Embed Configuration Details check the value of tokenType
property. It can be either AAD
or Embed
. Make sure it matches the type of the token, that you provided in accessToken
property.
AAD tokens are acquired when authenticating against Azure AD (usually by calling some AcquireTokenAsync method). You can use them to access all reports that your user has access to, and to make Power BI REST API calls.
Embed tokens are acquired by calling GenerateTokenInGroup or other similar method. They are valid for a specific object (e.g. only this one report) and are the recommended way to embed Power BI elements in your application, but they require a capacity (Power BI Premium or Embedded) assigned to your workspace.
Upvotes: 1