Closed msnyder-msft closed 9 months ago
This issue is not related to powerbi-client-react repository, seems to be a user error. The correct way to generate the embed url is not to have it static in the code, but use a REST API to GET the report using Power BI public REST APIs,. This is due to the fact the embed URL may change and contain some parameters that are required for the report render.
You can check out our developer samples to see how we fetch the embed URL
Thanks! The hard coded URL is a temporary thing just to see the report show up. But let me give that a try. Is it true that we need to pass the access token for the user even to show the report? In the past we were somehow getting away without having to do that but I see in the examples you shared they pass the token to the embed component so perhaps that is also causing this?
Yes, the token most be provided (access token or embed token)
Is there any way, I can embed the report without the access token ? as I want the report to be accessible to a particular group of people with autoAuth. Because having a bearer token will let anyone with it to access the report. Thank you
This problem occurs in powerbi-client@2.23.0
and can be mitigated by installing powerbi-client@2.22.4
.
More: powerbi-client@2.23.0
has an allowedPowerBiHostsRegex
regex that uses the g
flag, which causes it to remember where the last successful match was, and therefore sometimes returns true
and sometimes false
.
This problem occurs in
powerbi-client@2.23.0
and can be mitigated by installingpowerbi-client@2.22.4
.More:
powerbi-client@2.23.0
has anallowedPowerBiHostsRegex
regex that uses theg
flag, which causes it to remember where the last successful match was, and therefore sometimes returnstrue
and sometimesfalse
.
Thank you . Yes downgrading to powerbi-client@2.22.4 works for me.
This problem occurs in
powerbi-client@2.23.0
and can be mitigated by installingpowerbi-client@2.22.4
.More:
powerbi-client@2.23.0
has anallowedPowerBiHostsRegex
regex that uses theg
flag, which causes it to remember where the last successful match was, and therefore sometimes returnstrue
and sometimesfalse
.
thanks, this worked
This problem occurs in
powerbi-client@2.23.0
and can be mitigated by installingpowerbi-client@2.22.4
.More:
powerbi-client@2.23.0
has anallowedPowerBiHostsRegex
regex that uses theg
flag, which causes it to remember where the last successful match was, and therefore sometimes returnstrue
and sometimesfalse
.
is there any solution for powerbi-client-react the library specifically for react
The issue has been fixed with the new version release of powerbi-client v2.23.1 .
Install the latest version and let us know if you still face the same issue.
The issue has been fixed with the new version release of powerbi-client v2.23.1 .
Install the latest version and let us know if you still face the same issue.
It works for me! thx!
The issue has been fixed with the new version release of powerbi-client v2.23.1 .
Install the latest version and let us know if you still face the same issue.
2.23.1 worked for me too thanks!
I had same issue. Thanks for v.2.23.1 It worked for me too.
I had a different error message (Invalid embed URL detected. Either URL hostname or protocol are invalid. Please use Power BI REST APIs to get the valid URL
), though looks like the same underlying issue. Confirming v2.23.1
fixed it for me as well. Thanks!
I am still facing this issue can someone help me with this? I am using v2.23.1 and migrated to react 18
Can you please show a screenshot of the dependencies
part in your package.json
file?
Hmm... it seems nothing special. Maybe you can try deleting the node modules folder and the package.lock.json file, then run npm install
to reinstall all the packages. I don't know if it helps but have a try. 😃
We are trying to embed a report in our react app but are consistently getting blocked by this error "Embed URL is invalid for this scenario. Please use Power BI REST APIs to get the valid URL". It doesn't seem to matter how we modify the URL, it won't load no matter what. When I remove the
autoAuth
QSP then it just shows a loading indicator forever.I got the URL by going to the PowerBI report and selecting the Embed option and pasting that URL into my code.
We already had code that was working with this report a few months back on this same package version but we had put it on the shelf and now when we came back it no longer is working despite not making any changes to it on our side. This leads me to believe it might be some kind of service side change that is causing the issue but if someone has other ideas on how to troubleshoot or things to try I would be open to any suggestions.
Embed snippet
Stats: Package version 1.3.5 (also tested with 1.4.0)
Screenshot