How to call the Power BI Activity Log API - powerbi

I would like to call the Power BI Activity Log API with data factory each day to download the activity events into a blob store. I thought I'd use a Copy data activity with an HTTP dataset as source to call the REST API. How do I authenticate in the HTTP dataset's linked service? Do I need to register an Azure AD application with Power BI admin rights and refer to it in some way in the linked service?

Maybe you can have a look at Service Principals, it can help you to easily authenticate and access Power BI admin read-only APIs (ActivityEvents API included) without tying you to a particular user account. Its in preview feature as of today, but should be soon out of preview.
Also, for automating the fetching of logs using Azure Data Factory and ingesting it in Azure Blob, you may have a look at this great article which explains in detail, all the steps that will be required to create the pipeline. Should be helpful!

Related

How can I publish Power BI Report to a website

I need to do reporting for my client and are looking into Power BI. What I need to do, is create the report and publish it to the client's website for the public. These reports are public knowledge, there is no security risk to distribute it.
The users should be able to see the report on the website and use some filtering options that comes with Power BI.
I have installed Power BI Desktop (free option) and created the report, but I can not 'Save as' to Web - there is no such option.
My questions are:
Do I need a licence to be able to publish to the web.
Once published to the web, will it be displayed on the website to the users with the functionality to filter and drill down even if they do not have Power BI license?
You have two options - Publish to web and to use the API to embed for your customers (a.k.a. app owns data).
In both cases you must publish the report to Power BI Service. You will need an account for that, but even the free one will work for Publish to web case. However, it is way more limited that the actual embedding using the API.
To register an account, you will need a "business e-mail address", i.e. GMail, Outlook, etc. will not work. This is required, because it will create a tenant for this domain, where the administrators in your organization can manage it.
For Publish to web the administrator must explicitly enable that option in the admin portal. Embedding using the API require programming skills, and normally you will need to buy a "dedicated capacity" (i.e. Power BI Embedded or Power BI Premium).

Connect Web API as a data source to power bi using authentication

I have azure web api app with number of web apis of type post/get to get data. these apis are having basic authentication (bearer token)
I want to use 2-3 APIs as a data source in power bi, so that I can use these APIs JSON response as a table.
In Power BI Desttop > Get Data > Web > add API URL with sample GET API method name, will work but then it is asking for authentication.
If I tried to put API Key, then it is saying: A web API key can only be specified when a web API key name is provided.
How to connect web api using authentication in power bi as a data source.
PowerBI web seems to currently have little or no support for connecting to data via webapi, or web queries generally.
PowerBI Desktop allows you to get data from the web. I have been able to access data from webapis managed by Azure API Management in two different ways:
Use Advanced rather than Basic in the From Web dialog box. Put the webapi query in the url, but add a header with name Ocp-Apim-Subscription-Key and put in as value the value of the api key.
Alternatively, instead of putting the api key in the header, with APIs managed by Azure API management, it seems you can add them to as a parameter to the apiquery, subscription-key=PutYourApiKey here.
However, I have found that although you can publish your data source or report to an online workspace, PowerBI online will give an error ("credentials not recognized" or similar) when you try and refresh the data! So as mentioned above, PowerBI online seems currently (Nov 2020) useless for connecting to WebApi data.

Azure portal's active directory app integration with power bi content

I have created an native app enabling powerbi service permissions in azure portal going through azure active directory -> app registration. Now I want to create power bi reports, workspace on that created app but if I go to https://app.powerbi.com I can't see that created app on my power bi app.
I am confused here actually how to add power bi reports under that app because I want to access power bi rest api using adal.js lib where I need app id and want to access reports under that app.
Anybody can clear my confusion here?
Your confusion is with the terms "Apps" in Power BI. The app you registered has nothing in common with these. It is a guid, used from Power BI to identify your native app.
When you create a native app, you register it (what you did) and Power BI REST API uses this appID (also called ClientID) to identify your app and the permissions it has. When you call the API, you need an access token. It will be acquired in the context of some user. This user must have rights for the reports you want to access. So simply make a workspace, grant rights to users and publish your reports there. Then you will be able to embed them in your app.

How to share Power BI reports to clients via app.powerbi? Also what is the difference between report and dashboard in power bi app?

I'm a newbie in Power BI..
I need to develop a tabular report (no visualizations) in Power BI and publish it to powerbi app so that client can see live reports.
For that what are the settings we have to do in app.powerbi or powerbi cloud?
When I published a report in my pbi cloud, in the report section, there is an option to publish /embed code. But it says the content will be available to public. So how can we restrict access? Do the client need to have pbi account to share the reports? Please let me know what type of PBI account we have to purchase to meet this requirement.
Also is it mandatory to create dashboard in order to share it to the client? Because report option serves the purpose? Is there any advantages in creating dashboard over reports?
Or do you feel any other suggestions rather than Power BI?
Data format: txt, tab delimited
Type of data: Medical records
Any help on this is greatly appreciated.
Power BI world has different things:
Power BI Desktop (PBID)- this is fat desktop client to create reports. You can use it for free.
Power BI Services (PBIS)- this is SaaS application that allows you create reports and share it. When you open powerbi.com you work with this app. All you reports located in logical containers - workspaces. This container like folder, nothing more. You can publish report from Desktop here into specific workspace. You can embed report from there, but without authentication, thus everyone can see it.
Power BI Embedded (PBIE)- this is PaaS solution to embedded reports into you app. Reports anyway should be stored into some workspace at PBIS. But you app can implement auth and show only specific reports to particular users. All users in you app can see different content and reports, based on your app logic, because you manage access to report via PBIE SDK. Take a look at playground.
So when your users work with PBIS they work with Microsoft Web App, if you want embedded same reports into you app, use PBIE with provided SDKs.
As for licenses. In fact there is only one license type: PRO.
If your users want publish and share reports using PBIS they ALL must have PRO licenses. That the point. You can use all products free unless you want share you reports and analysis. If you need to share you have to pay.
Different thing for PBIE. You implement your app as you wish, you manage you users. They should not have PRO licenses. In fact, you need one license to store you reports. I call this like service account. This is regular PBIS user with PRO license. You use it only for publishing reports and storing it at PBIS and you app use it to load and embedded reports. If you have 1000 users, you can buy 1 license and use it to publish you work and all users will be authenticated in you app, authorization also will be done in your app.
Another thing, that once you go in prod you need to buy capacity - Power BI Embedded Services at Azure. The cost depends on renders. Read more docs on this.

Can i generate dashboards through Power BI and publish it directly to clients website?

I am newbie to web technology ,so i am not able to get the steps for doing this.
I will have data fetched from data base and do some report generation and dashboarding in power BI.
I need to integrate the dashboards and reports on weekly basis to clients website.
Do i need to generate apis or some other alternatives?
There is the Publish to web option. You can copy either a url to your report or the html code you can then embed wherever you want. You can find Publish to web in the report menu. If it is not there, ask your global admin to activate it in settings.