March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am attempting to use Fabric Data Factory to extract Power BI log data using this documentation: Extracting the Power BI activity log with Data Factory – justB smart and How to Get Activity Data From Power BI Service with REST APIs | phData. which is for Azure Data Factory. Instead of creating a linked service, with Fabric Data Factory I had to createa new Data Gateway Web2 connection using a Service Principal.
In Fabric Data Factory I created a new pipeline and am having problems with the simple Copy Data Activity. I set it up as follows:
For the Relative URL, I do not know what to enter. I have tried /v1.0/myorg/admin/ and /powerbi/api but "Preview Data" still fails.
Also, in the instructions for Azure data factory, in the "Copy Data" activity settings. Under source there is the option to add a value for AdminAPI under DataSet properties. In Fabric Data Factory, under the connection there are no dataset properties. Any help and advice to get this gong would be appreciated.
Solved! Go to Solution.
I was able to get it working. In the for Azure data factory, in the Copy Events activity in source there is a Dataset properties option where you can add AdminAPI and give it the value:
activityevents?startDateTime='@{formatDateTime(getPastTime(int(item()), 'Day'), 'yyyy-MM-dd')}T00:00:00.000Z'&endDateTime='@{formatDateTime(getPastTime(int(item()), 'Day'), 'yyyy-MM-dd')}T23:59:59.999Z'
In Fabric Data Factory a connection is used instead of a linked service and there is no Dataset properties. What I did to get it working was put the Activity Events content above into the Relative URL section. It worked after that and I retrieved data from the Power BI Activity log.
Hi @Lorenz33 ,
Maybe you can try below rest api:
GET https://api.powerbi.com/v1.0/myorg/admin/activityevents
Admin - Get Activity Events - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I am using these instructions: Extracting the Power BI activity log with Data Factory – justB smart and How to Get Activity Data From Power BI Service with REST APIs | phData.
These instructions say that a pipleline needs to be created that calls the “Get Activity Events" REST API with the right set of URI parameters (startDateTime and endDateTime).
The instructions are for Azure Data Factory. I am trying to use Fabric Data Factory. With Azure Data Factory a linked service needs to be created to access the Activity log. With Fabric Data Factory I cannot use a linked service. I successfully created a new connection that uses a service principal that has been allowed to used read-only Power BI admin apis. This permissions was given in the tenant settings. More details on this connection are found here: Solved: Service principal authentication for Web Connectio... - Microsoft Fabric Community
A Copy Data activity needs to be created. In Azure Data Factory, for the source section there is an option to choose a source dataset. I believe they chose the linked service. There is also the dataset properties option where an AdminAPI can be added that calls the "Get Activity Events" REST API. In Fabric Data Factory. We cannot use a linked service. As in the picture I posted above, I have to use a connection from which I use the web connection I created that has access to the Power BI Activity log. However, in the Copy Data settings, there is no Dataset properties area under the connection and those no way to add an AdminAPI that calls the "Get Activity Events" REST API. How can this be done?
I was able to get it working. In the for Azure data factory, in the Copy Events activity in source there is a Dataset properties option where you can add AdminAPI and give it the value:
activityevents?startDateTime='@{formatDateTime(getPastTime(int(item()), 'Day'), 'yyyy-MM-dd')}T00:00:00.000Z'&endDateTime='@{formatDateTime(getPastTime(int(item()), 'Day'), 'yyyy-MM-dd')}T23:59:59.999Z'
In Fabric Data Factory a connection is used instead of a linked service and there is no Dataset properties. What I did to get it working was put the Activity Events content above into the Relative URL section. It worked after that and I retrieved data from the Power BI Activity log.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
9 | |
4 | |
3 | |
2 | |
1 |
User | Count |
---|---|
14 | |
10 | |
9 | |
5 | |
4 |