Hi,
I am getting this error on the component : "Embed URL is invalid for this scenario. Please use Power BI REST APIs to get the valid URL ".
Both the token calls are successful, and after the token fetch, getting this error. below is the stack trace. Please help me understand what needs to be fixed :
Error: Embed URL is invalid for this scenario. Please use Power BI REST APIs to get the valid URL at Report.Embed (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.powerbi.js?gG6jlRRdnOFO6yQCyjeO3w:8062:19) at new Report (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.powerbi.js?gG6jlRRdnOFO6yQCyjeO3w:9748:24) at __webpack_modules__../src/service.ts.Service.createEmbedComponent (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.powerbi.js?gG6jlRRdnOFO6yQCyjeO3w:11549:20) at __webpack_modules__../src/service.ts.Service.embedNew (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.powerbi.js?gG6jlRRdnOFO6yQCyjeO3w:11529:30) at __webpack_modules__../src/service.ts.Service.embedInternal (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.powerbi.js?gG6jlRRdnOFO6yQCyjeO3w:11487:30) at __webpack_modules__../src/service.ts.Service.embed (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.powerbi.js?gG6jlRRdnOFO6yQCyjeO3w:11450:21) at embedPowerBIReport (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.PowerBIWidgets.EmbeddedReportBlock.mvc.js?nsv2BIPEHL8A8YlGyCI4hw:500:40) at https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.PowerBIWidgets.EmbeddedReportBlock.mvc.js?nsv2BIPEHL8A8YlGyCI4hw:546:1 at e.safeExecuteJSNode (https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/OutSystems.js?5X3ZVRM+Rn2sb_x7+4GgkQ:16:14372) at https://personal-aufe6fkw.outsystemscloud.com/PowerBIEmbeddedReports/scripts/PowerBI_CW.PowerBIWidgets.EmbeddedReportBlock.mvc.js?nsv2BIPEHL8A8YlGyCI4hw:277:39
You can use the Get Report endpoint and try the embed URL you get in the response.As a note, even if you get the token back, if you missed any details, like for example a dataset or some other parameter, the report won't load.
Hi Freddy,
Thanks for your response, when i try to use the GetReport Api, i keep getting 403 - forbidden. Any idea what i am doing wrong.
in the API URL - https://api.powerbi.com/v1.0/myorg/reports/{ReportID}
last part is report id, and what is 'myorg' i need to pass?? or this need to be used as is ? do you have any working sample which i could refer to ?
Thanks a lot, appreciate your help !
Thanks !
Vikas
The value myorg should be okay.
There are a couple things that you can try to get the URL.If the original URL you were testing has parameters like autoAuth or pageName you can try removing those as suggested here.
You can also use the GetReportInGroups endpoint, where the group is the Workspace ID of the workspace where your report is setup. Here is a postman collection with this endpoint. Once you import that collection, you can setup the variables. Make sure the values are displayed in the Current Value column.
Then you can go to the Authorization page to generate a token.
Click Use Token in the popup
Click on the request and test it.
The response should have the details of all the reports in that Workspace. You can use the embed URL of the report you want to test.