Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
FabScone75
Regular Visitor

Using Power BI APIs to get tenant overview

Hello, 

 

I'd appreciate advice on my process and whether I am going the right way here. 

 

The project is to get an overview of our tenant, who is doing what, which workspaces we have, what reports are being built and by whom etc. To that end, we have created a process to query the Power BI Rest API on a daily basis. This we do via a pipleline with a copy data activity, that creates a json file inside a folder structure of year/month/day (eg raw_api_groups/2025/09/28/20250928.json). This is my bronze layer.  My thought was to keep a 90 day history of these json files. 

 

For silver layer, I have a Dataflow Gen2 that opens the raw_api_groups and brings in all the json files. It combines these together, and then deduplicates based on the primary key (eg on workspaces, this would be workspace_id). I add in the source file (eg 20250928.json) as well as the ingestion_date as a column and then output this to replace the current dim_workspace table. 

 

Is this a good process? Any suggestions in terms of improvements? 

5 REPLIES 5
tayloramy
Community Champion
Community Champion

Hi @FabScone75 ,

Below is an approach Iโ€™ve used in real tenants for โ€œwhoโ€™s doing what / whereโ€ and how Iโ€™d tweak your Bronze > Silver flow to make it more reliable and easier to report on later.

 

  1. Collect the right signals
    - Use the Power BI Admin โ€œscannerโ€ APIs for workspace/artifact inventory and schema (Metadata scanning (Scanner API)). Prefer GetModifiedWorkspaces for incremental scans.
    - Use Admin โ€œactivity eventsโ€ for user actions (Get Activity Events) - this is the authoritative โ€œwho did whatโ€ source.
    - Resolve users/licensing with Microsoft Graph (optional), e.g. Users.
  2. Keep raw forever (cheap) and normalize early
    - Keep your daily JSON in a date-path forever or compact to Parquet/Delta weekly.
    - In Silver, donโ€™t throw away change history. Maintain an SCD Type 2 history table and a dim_workspace_current view/table.
  3. Use incremental + watermarking
    - Stamp ingestion_date from the file path and use Dataflow incremental refresh.
    - For scanner APIs, use GetModifiedWorkspaces with your last successful scan time.
  4. Harden the pipeline
    - Service principal auth; enable read-only admin APIs (Tenant settings).
    - Implement retries/backoff for 429/5xx; store API run metadata.
  5. Model for analytics
    - Gold star schema: FactActivity plus DimUsers, DimWorkspaces, DimDatasets, DimReports for easy slicing.

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

v-sdhruv
Community Support
Community Support

Hi @FabScone75 ,

I hope the information provided above assists you in resolving the issue. If you have any additional questions, please feel free to reach out.

Thank You

v-sdhruv
Community Support
Community Support

Hi @FabScone75 ,

I hope the information provided above assists you in resolving the issue. If you have any additional questions, please feel free to reach out.

Thank You

BhaveshPatel
Community Champion
Community Champion

Hi @FabScone75 

 

You are not using the right approach for Audit Log. Here I can see mess everywhere. 

 

First thing first

1. Use Power BI Dataflow Gen 2 to land the data in SQL database. 

BhaveshPatel_0-1759570199260.png

 

 

2. Use Microsoft Purview for the unified audit log ( Before it was called Power BI Audit Log, now they are called Fabric Unified Audit Log in Microsoft Purview. You might need to contact your Fabric Admin for that. All activities are recorded "Who is doing what and which workspace are assigned..etc" in the Audit Log.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
v-sdhruv
Community Support
Community Support

Hi @FabScone75 ,
Since we didnt hear back, we would be closing this thread.
If you need any assistance, feel free to reach out by creating a new post.

Thank you for using Microsoft Community Forum

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Weeks

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)