Forum Discussion
PallaviKGVG
Helper I
8 years agoCannot load embedded report (400 Bad Request) GET [...]us-east2-redirect.analysis.windows.net/[...]
Hi, I am getting access token and getting power bi groups and reports through access token. I am getting all the properties of report , but i am not able to embed on html. I am using angular2-pow...
hs-kathryn
2 years agoNew Member
Following up: I found for me it was tied to a default in the Embed class, where there's a hardcoded defaultEmbedHostName being set to "https://app.powerbi.com". When I modified the distribution js file as a test to set that default as "https://app.high.powerbigov.us", it worked fine.
Tracing that higher, what I discovered was we are using the powerbi.bootstrap() call, which without a hostname sent in it uses the default, which is of course hardcoded. When I changed my bootstrap call to the following as a test, it worked again with the default minified dist js file:
powerbi.bootstrap(htmlElement, { type: 'report', hostname: 'https://app.high.powerbigov.us' });
Only after doing all these tests did I find the documentation on bootstrapping does technically specify that I need to send this in, but boy was it a convoluted way to find out.
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/bootstrap-better-performance