Power BI embed code throws 403 forbidden error from server - powerbi

The embedded power BI dashboard is rendered fine at localhost domain, but on another domain it renders some time and not always, which is on server throws a error.
errorlog image1 and errorlog image2
I am calling the powerbi rest api's from my server[PHP laravel] end and i am returning the embedtoken,reportid,embedurl to the client side[Angular4]. I use angular2-powerbi npm package for embedding the report on ui.
Please, some one help me on this. It's been a long time i am trying to fix this.
Early solution is appreciated.
Thanks in advance

Based on "errorlog image2", your token has expired.
Here is a example how to get a new token: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Refresh-token-using-JavaScript-SDK-example

Related

PowerBI Embedded not working because of X-Frame-Options

I'm using powerbi-service-js to embed reports in my Angular 8 application. Until October 3rd, everything worked fine. I would log in to the url (https://login.microsoftonline.com/common/oauth2/token) and then make a request to the powerbi API to get the report token. But now, when using pbiService's embed function, I get the following error. I'm using DirectQuery to construct the report and Deploying the Application in Nginx.
That's the error on Chrome console:
Refused to display 'https://app.powerbi.com/tokenRefresh?ver=1570487269987' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
ERROR DOMException: Blocked a frame with origin "https://app.powerbi.com" from accessing a cross-origin frame.
at e.retryTokenRefresh (https://app.powerbi.com/13.0.10956.175/scripts/reportEmbed.min.js:1:2245948)
at e.onTokenRefreshLoad (https://app.powerbi.com/13.0.10956.175/scripts/reportEmbed.min.js:1:2245770)
at HTMLIFrameElement.document.getElementById.onload [as __zone_symbol__ON_PROPERTYload] (https://app.powerbi.com/13.0.10956.175/scripts/reportEmbed.min.js:1:2245299)
And probably you are viewing this using Google Chrome browser? Because since the date you mentioned, it blocks mixed content. So check your URLs and make sure you do not use HTTP, but all of them are HTTPS. You can confirm this theory by viewing your app in another browser.

Vtiger cannot filter by created date

Could you please help me a bug in Vtiger. In the past, this is not happened.
i have tried to input from date to date in created date column and click search in Opportunities module. But system has throwned permission issue:
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Thanks,
Victor

Create product in Microsoft Dynamics 365 for Financials

I try to create a product (item) using OData V4 URL available in Web Services section in Microsoft Dynamics 365 for Financials as shown below.
I use Postman to execute the POST request. Each request is proceed with an authenticated and valid account.
The POST OData V4 URL is taken from the Web Services sections example: https://xyz.financials.dynamics.com:7048/MS/ODataV4/Company('my-company')/Items
I also tried the entity "Item_Card", same result.
Here is the config set in Postman:
Headers
Body
When I execute the request, I get the following error:
What is the missing "Data object"? Is this a standard of OData V4 protocol? Do I must supply a "Data object" into the body?
Is there anyone encountered that error and could explain what is missing/not working?
Update 2017-05-10
It seems that the REST endpoint is not available for Microsoft Dynamics Financials build < 16552. I currenly use build 16259.
Update 2017-05-23
I am now running on build 16552. I still get the same error. The update seems to have no effect on the POST request.
I had a similar issue today.
I am using SoapUI for testing a simple webservice on a custom table in an on premise version nav2017.
In the end I found out that I was writing a Date on a Date field in NAV. After changing that to DateTime and sending a correct date time string it was working.
It probably does not answer your question as I see no date in your body, but maybe for others who are searching for the error "Data Object not provide" it might help to check if the datatypes used in the body matches the datatypes in NAV.
Regards, Henry Verheij
I receive this error as well. In my case I was adding a vendor and I missed the NO. (this field is not on the interface'vendor card', but it appears in the listing and is mandatory in the service, however no documentation about it). So my guess you probable is missing a mandatory field.
PS:I used OData v4 Client Code Generator to generate my proxy from the metadata.

Facebook returning HTTP status code 502 while making a GET Request

I am trying a GET request from Facebook for a batch of ids using my app access token separated by a comma.
Please find below the call:
https://graph.facebook.com/?ids=1374186930,100005305471358,1516423103,100003031846875,100002939786624,100004705179654,522691095,100002893804783,100005269178084,1417831236,100004652521769,100003511989378,100002394692546,1646211152,1092931510,100000152985362,100004151552444,100004122698187,100001574061632,100005007584068&access_token=<my_app_access_token>&format=json
Facebook returns an error intermittently for some of these requests with an HTTP status code of 502.
I've tried fetching for these ids using the graph API explorer as well as the app access token later. They have been fetched properly. I have performed some research, but all issues of Facebook were related to open graph and 502 is "Bad Gateway Error". Since mine is not a web app, I cannot even refresh a browser to make the call again. This is a normal call made to Facebook API.
The error returned by Facebook is html which contains the following message:
"Sorry, something went wrong. We're working on getting this fixed as soon as we can."
Since they have given this response, I want to know if someone is facing this issue as well and if somebody could tell me, when this will be resolved.
This is affecting the other calls as well and there is a delay in the fetching.
Thanks in advance.
The Error 502 means that the message is too large. I do not know exactly the maximum size. Curiosity. What language are you using??
Good Bye

Calling a Jasper Server report from jsp

I'm a newbie to this area and need help.
I'm working with Jasper reports server. My goal is to call a report published in JasperServer from a jsp. Is it possible?
Until now I was able to show a report on a html page using http api, but the problem there is that user credential are in cleartext and not hidden.
Any ideas?
Try using Rest API of JasperServer and use some rest clients like Jersey to get the response of your report as input stream and render that in your JSP.
I think these are helpful to you.
Calling a .jasper file from a JSP
Streaming a PDF Jasper Report Using JSP
After reading all yours suggestion i came up with this solution:
PutMethod put = new PutMethod(request3);
put.setRequestEntity(new StringRequestEntity(descriptor, "text/xml", "UTF-8"));
int statusCode3 = client.executeMethod(put);
//System.out.println(put.getResponseBodyAsString());
String report = put.getResponseBodyAsString();
Simply i found a way to set up the body of my PUT HTTP request and everything works fine!
I posted the solution maybe can help someone!
Cheers!!