Power BI Embedding - powerbi-embedded

I'm using Power BI REST API's to integrate or embed the reports created in Power BI. By using these API's i'm getting Access token, Embed token, Report Id, Data-set Id and Embed URL also but when i embed my report using J query Ajax then it gives me the pref-light error. So, please let me know how to solve this error. In addition of this i have Power BI Pro account. Below are the API's and screenshot of error.
https://login.microsoftonline.com/common/oauth2/token
https://api.powerbi.com/v1.0/myorg/groups/976sdsdf-c82e-4217-9f74-3c50e694fe6f/reports
https://api.powerbi.com/v1.0/myorg/groups/9765dc8f-c82e-4217-9f74-3c50e6qwwq6f/reports/32fwdqwa-e31b-4676-b598-7268baa5be75/GenerateToken

See if relevant
Got 400 error for pre-flight options CORS token request from OWIN-based WebAPI
Also, can you maybe check what is the response itself that is returned? what is there besides the 400? maybe some message?

Related

Adding a header to a web API request in the data sources section of a report in PBI Report Server

I have created a report using power bi desktop (Version January 2021). In order to get the data for this report, I connect to a web API using the provided API key in the header part of the request:
This part works fine and I get the necessary data to work on the Power BI desktop.
When I publish the created report to a Power BI Report Server, as you can see in the following image, there is no way to add the header data which in this case is mandatory to authenticate:
The Authentication part in the Credential section in the above image does not support adding headers data and only accepts Anonymous, Basic, and Windows authentication which are not applicable here (The test fails).
As the data in my report changes regularly and I need to schedule an automatic refresh, the Report Server has to connect to the Web API at the scheduled times in order to get the latest version of the data.
I would appreciate it if you could help me to solve the encountered problem. Regards
The access key should be part of the query options and in PowerQuery you should have something like
Source = Csv.Document(
Web.Contents(
"http://example.com",
[
RelativePath = "api",
Query =
[
api-key = "s4fad456df"
]
]
),
),
The authentication to the web data source is always Anonymous in Power BI.
https://learn.microsoft.com/en-us/powerquery-m/web-contents

Power BI : Get a list of all Power BI Apps with Users having access to it

I am looking for a method to extract all the apps in Power BI and the users having access to the application.
We can get for individual users Power BI rest Apis but I am looking for a consolidated list.
Please can someone help.
Can you check the following thread where this is already discussed? It covers the extraction of user access but the list of applications used doesn't seem to be available via PowerBI API

Power BI - Difference between Publish to Web and Website (Portal)

I want to know the difference in the following 2 options in Power BI Service -> File -> Embed Report:
Website or Portal
Publish to Web (public)
My observation was that you can use Report Filters in Website or Portal option but Report Filters are disabled in Publish to Web option.
Can someone please answer my following queries:
When should we use each of the 2 options?
Which option needs Power BI Embedded Tokens and Capacity to use in production environment?
Can users use Filtering on the report in both the 2 options?
Thanks!
Gagan
Please find the answer below:
1.Difference between Publish to Web and Publish to Website
Publish to Web:
Report will be public
No need to Login (Anyone with the link can view the report)
With the Power BI Publish to web option :
a. You can easily embed interactive Power BI content in blog posts, websites, emails, or social media.
b. You can also easily edit, update, refresh or stop sharing your published visuals.
Publish to Website:
Report will be private
Need to Login first (Unauthorized personal can’t be able to view the report)
With the Power BI Publish to website option :
a. User who has access to that workspace can see the report.
b. User who is member of your organization can see report from that workspace.
2.You don't need the Tokens and Capacity to publish the reports to web or website.
3.Filtering with Publish to Website and Publish to Web
With Publish to Website you can use filtering.
With Publish to Web to use the filtering on the report, you need to have the Power BI Pro License.
Publish to web does not allow display of the filter pane and tabs - at least as for now according to the Microsoft - see this link and the section called "Considerations and Limitations": https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-report-filter. So if you have filters in the filter pane you would have to move them over to the main content of the report - not ideal if users are already used to using filters on the filter pane.
Publish to website or portal will just give you an iframe with a private URL and when users load the web page they will have to authenticate.
In order to embed and authenticate on behalf of all the users you will need a token. One way to do this is using principal service account - this way you won't be supplying any user account credentials. This workflow is well documented and you can even download a test application with working code where you would need to supply your values such as workspace id, report id, tenant id, application id and finally application secret. Get started with token authentication using this link: https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-tokens. Double check token expire date and set it appropriately.

How to call a CRM action from powerbi

Need to call a CRM Custom Action with parameters from Powerbi
Please help me with this.
Thanks in advance!!!!
Power BI is just a data visualization platform, not a replacement for app development.
When you want to do such things like clickable action in each row of PowerBI report list of records - maximum possibility is hyperlink (url). Unfortunately CRM Custom action is not url accessible, but that too you want with paramters. Forget it.
I have other ideas shared in this SO answer, like you can try Power Automate (MS Flow) or custom API to explore by url accessibility.
You can also achieve your requirement with the help of Power Automate.
Steps -
Create new flow with Http Trigger
Invoke flow URL from power BI
Call custom action from flow
Please mark my answer verified if i were helpful

Getting Power Bi Embedded URL

I want to get the embedded URL of my existing reports. Is there any option to get those URL in a list view?
As per i know, currently there is no api for retrieving all reports.
For more information, you can refer Power BI Api reference.
You can get a list of all reports which have embed code. However you need an extra click to get the embedded code.