0

embedConfig={{ type: 'report', id: tab.Report_ID_AZ__c, embedUrl: embedReportUrl(tab.Report_ID_AZ__c, tab.Group_ID_AZ__c), accessToken: tab.powerBItoken, tokenType: models.TokenType.Embed, settings: { panes: { filters: { expanded: false, visible: true, }, } }, filters: tab.filterConfig, }} SyntaxError: JSON Parse error: Unexpected EOF

1 Answer 1

0

The embed token specifies which Power BI content can be embedded and it needs to be generated by the REST API. You may have missed a comma or a quotation mark in your code. Try this:

embedUrl: embedReportUrl(tab.Report_ID_AZ__c, tab.Group_ID_AZ__c),
accessToken: tab.powerBItoken,
// tokenType: models.TokenType.Aad,
tokenType: models.TokenType.Embed,
settings: {
  panes: {
    filters: {
      expanded: false,
      visible: true
    }
  }
},

If this does not work, you may have an authentication issue with your auth token or an access level issue with your dashboard. You can check the documentation for more details on how to generate and use embed tokens correctly.

Sign up to request clarification or add additional context in comments.

2 Comments

Im getting the token from powerbi. during embed the token its throw JSON parser error. Attached the screenshot. But embed token works with other report. Only fail on particular report.
Can you provide more details ? I can't see the attached screenshot of error 🙄

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.