Want to get store User Activity Data from Power Bi service to data lake gen 2 using adf pipeline and Power Bi REST API

Amar Agnihotri 926 Reputation points
2022-06-16T09:57:19.68+00:00

Hi,
I have created an admin panel in power bi desktop . This is my panel
211966-pbi-admin-panel.gif

I performed following steps in power bi desktop

Step 1 - i created a function Get Access Token to generate Bearer Access Token
211990-image.png

Step 2 - I created query for the workspaces inside which the function Get Access Token being called to get the refreshed data
212071-image.png

Step 3- I created queries for Dataflows, Datasets, Reports, Users, dashboards just taking the reference of Workspaces query
212081-image.png

Step 4- Now to get the data of User Activity i created Get Activity Function and called EventActivity api to get the last 30 days of data. This api is using continuation token to combine the data.

Get Activity Function
212083-image.png

User Activity Query
211967-image.png

This is how i created this panel in power bi desktop.

Now let go to the azure data factory. I want to store this user activity data in datalake gen 2 using adf pipeline . I don't need workspaces, dataflows, datasets, Reports, Users data in datalake . Only Useractivity data is needed. I will run that pipeline to get last 30 days data and will store it in a blob and then i will run the pipeline everyday to get data for each consecutive day and will create an archive in another folder. that's how i will have last 30 days data in one folder and then each consecutive day data in another folder. I am using a Logic app to call this user activity api and it is generating continuation token successfully. as shown -
212007-image.png

Now after this i am stuck. I don't know the steps to proceed further using adf to implement the same logic as i did in power bi desktop. can you please suggest the steps to achieve this .

Thanks

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. ShaikMaheer-MSFT 38,631 Reputation points Microsoft Employee Moderator
    2022-06-17T10:26:17.797+00:00

    Hi @Amar Agnihotri ,

    Thanks for posting query in Microsoft Q&A Platform.

    So, here API call in logic app gets you User activity data for you? If yes, why we are using logic app here? Why not to use web activity in ADF to make API call? Or we can also consider using HTTP connector or REST connector to make API call and get data and store data to desired destination storage.

    In copy activity, under source tab we should use REST connector type dataset and under sink tab we should use ADLS Gen2 dataset.

    Please check below links to know more about web activity, REST connector and HTTP connector.

    Please let us know how it goes.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.