Forum Discussion

FabScone75's avatar
FabScone75
Helper I
10 months ago
Solved

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 repo...
  • tayloramy's avatar
    10 months ago

    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.