Comments (7)
Hi @rush2kasi6401,
The powerbi-service should be able to automatically detect the environment you are trying to embed with.
Can you let us know how you are generating the embed-url and the access-token ? Can you also let us know the request body where the referrer is app.powerbi.com ?
from powerbi-client-angular.
We are using the following code to set the token (Service Priciple) and Embed Url.
try {
// reportConfigResponse = await this.pbiService.getEmbedConfig().toPromise();
forkJoin(
[ this.pbiService.getEmbedTripsConfig()]
).subscribe(
([res]) => {
reportConfigResponse = res
}
).add(() => {
// Update the reportConfig to embed the PowerBI report
this.reportTripsConfig = {
...this.reportConfig,
id: reportConfigResponse.Id,
embedUrl: reportConfigResponse.EmbedUrl,
accessToken: reportConfigResponse.EmbedToken.token
};
});
} catch (error: any) {
this.displayMessage = `Failed to fetch config for report. Status: ${error.status} ${error.statusText}`;
console.error(this.displayMessage);
return;
}
Here is the API code to get token
[HttpGet]
[Route("api/PbiAuth/EmbedReportConfig")]
public async Task EmbedReportConfig()
{
var embedResult = await m_embedService.EmbedReport();
if (embedResult)
{
return m_embedService.EmbedConfig;
}
else
{
return m_embedService.EmbedConfig;
}
}
We don't have an issue generating token or getting embed url.
However, getting below failures and failed to load report. I am confused, why referer is having: https://app.powerbi.com
from powerbi-client-angular.
Thank you for the information. I am assuming you are using the correct environment config for authenticating and making requests to powerbi similar to here.
We will check and let you know if we find anything.
from powerbi-client-angular.
from powerbi-client-angular.
@bapat-atharva - Here is more information on how we successfully embedded a sample commercial cloud dashboard. Whereas gov cloud report failed to embed due to CROS Issue as shown in below figures
from powerbi-client-angular.
Thank you @rush2kasi6401 for getting back with more information. We were able to embed using the US gov environment when we tried to, but we need to check for when migrating from Angular 10 to 14.
As I understand you were able to embed in a brand new Angular 14 application, so I am not sure if the issue lies with the package. We will update if we find anything.
from powerbi-client-angular.
from powerbi-client-angular.
Related Issues (20)
- Make it possible to set the active page from outside the powerbi-client HOT 1
- Can't work with a low version of angular HOT 1
- TypeError: Cannot read properties of null (reading 'postMessage') HOT 3
- Missing fonts and styles in power bi embedded reports HOT 2
- Doesn't work with Angular 15 HOT 4
- Does powerbi-cilent-angular library supports server side rendering? HOT 2
- Support for reseting a report HOT 6
- FrontLoadException conceptualSchema Exception: Unexpected end of JSON input
- Event Handlers not working for paginated reports. HOT 1
- Embeding PowerBI Desktop Report HOT 1
- Angular 16 Support HOT 5
- Can someone please explain how the token is delivered? HOT 8
- Optimization Npm Builed Failed when adding powerbi-client-angular in our Angular 16 app HOT 2
- Want to send additional parameters with request which we made to get the report HOT 2
- The PoberBI report stays in small iframe HOT 3
- How to show two or more PowerBI reports in the same page? HOT 2
- Unexpected results with LayoutSwitch HOT 1
- Property 'changeType' does not exist on type 'VisualDescriptor'.
- Warning CommonJS or AMD dependencies
- NaN issues while using zoom sliders on the visuals HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerbi-client-angular.