# pbi-guy/blog architecture

> Architecture diagram of the GitHub repository pbi-guy/blog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pbi-guy/blog
- Repository: https://github.com/pbi-guy/blog

## Overview

This is a collection of Power BI blog examples and sample assets, not one integrated application. The clearest executable workflows shown are checking and removing unused Power BI licenses, saving activity logs, and checking dataset refresh status before triggering a refresh. Other major capabilities are represented by notebooks, reports, templates, and data files in the tree; their internal wiring was not sampled, so they are shown as standalone examples. Relationships below are limited to those visible in the sampled Python source.

Main entry points: [`Save cost by removing unused licenses/Check User with PBI License.py`](https://github.com/pbi-guy/blog/blob/main/Save%20cost%20by%20removing%20unused%20licenses/Check%20User%20with%20PBI%20License.py) (License audit script), [`Power BI Dataset Refresh with Python/Power BI Dataset Refresh.py`](https://github.com/pbi-guy/blog/blob/main/Power%20BI%20Dataset%20Refresh%20with%20Python/Power%20BI%20Dataset%20Refresh.py) (Dataset refresh checker), [`Power BI and Activity Logs with Python/Save Log Files.py`](https://github.com/pbi-guy/blog/blob/main/Power%20BI%20and%20Activity%20Logs%20with%20Python/Save%20Log%20Files.py) (Activity log exporter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_governance["License governance"]
  node_license_script["License audit script"]
  node_graph_api{{"Microsoft Graph"}}
  node_activity_store[("Activity log files")]
  node_license_candidates["Inactive license users"]
end

subgraph group_operations["API operations"]
  node_log_export["Activity log exporter<br/>[Save Log Files.py]"]
  node_powerbi_api{{"Power BI REST API"}}
  node_log_csv[("Daily CSV log<br/>[Save Log Files.py]")]
  node_refresh_check["Dataset refresh checker"]
  node_refresh_state["Refresh status"]
end

subgraph group_examples["Power BI examples"]
  node_workspace_capacity["Workspace capacity assignment"]
  node_report_export["PDF report export"]
  node_fabric_metrics["Fabric metrics extraction"]
  node_tenant_settings["Tenant settings reports"]
  node_security_demos["Security demonstrations"]
  node_championship["Championship reports"]
  node_report_features["Report feature demos"]
end

node_license_script -->|"queries users"| node_graph_api
node_license_script -->|"reads logs"| node_activity_store
node_license_script -->|"filters inactive users"| node_license_candidates
node_license_script -->|"removes licenses"| node_graph_api
node_log_export -->|"fetches activities"| node_powerbi_api
node_log_export -->|"writes daily CSV"| node_log_csv
node_refresh_check -->|"checks refreshes"| node_powerbi_api
node_refresh_check -->|"checks status"| node_refresh_state
node_refresh_check -->|"triggers refresh"| node_powerbi_api

click node_license_script "https://github.com/pbi-guy/blog/blob/main/Save%20cost%20by%20removing%20unused%20licenses/Check%20User%20with%20PBI%20License.py"
click node_license_candidates "https://github.com/pbi-guy/blog/blob/main/Save%20cost%20by%20removing%20unused%20licenses/Check%20User%20with%20PBI%20License.py"
click node_log_export "https://github.com/pbi-guy/blog/blob/main/Power%20BI%20and%20Activity%20Logs%20with%20Python/Save%20Log%20Files.py"
click node_log_csv "https://github.com/pbi-guy/blog/blob/main/Power%20BI%20and%20Activity%20Logs%20with%20Python/Save%20Log%20Files.py"
click node_refresh_check "https://github.com/pbi-guy/blog/blob/main/Power%20BI%20Dataset%20Refresh%20with%20Python/Power%20BI%20Dataset%20Refresh.py"
click node_refresh_state "https://github.com/pbi-guy/blog/blob/main/Power%20BI%20Dataset%20Refresh%20with%20Python/Power%20BI%20Dataset%20Refresh.py"
click node_workspace_capacity "https://github.com/pbi-guy/blog/blob/main/Assign%20Power%20BI%20workspaces%20to%20a%20capacity%20automatically/Power%20BI%20Assign%20Workspaces%20to%20Capacity.ipynb"
click node_report_export "https://github.com/pbi-guy/blog/blob/main/Export%20Power%20BI%20reports%20as%20PDF%20via%20REST%20API/Export%20Power%20BI%20Reports%20as%20PDF.ipynb"
click node_fabric_metrics "https://github.com/pbi-guy/blog/blob/main/Extract%20data%20from%20the%20Fabric%20Metrics%20App/Save%20Fabric%20Metrics%20App%20Operations%20into%20OneLake.ipynb"
click node_tenant_settings "https://github.com/pbi-guy/blog/tree/main/Tenant%20Settings%20Notification"
click node_security_demos "https://github.com/pbi-guy/blog/tree/main/Row%20Level%20Security"
click node_championship "https://github.com/pbi-guy/blog/tree/main/Power%20BI%20Championship/2022"
click node_report_features "https://github.com/pbi-guy/blog/tree/main/Power%20BI%20and%20Paginated%20Reports"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_license_script,node_graph_api,node_activity_store,node_license_candidates toneBlue
class node_log_export,node_powerbi_api,node_log_csv,node_refresh_check,node_refresh_state toneAmber
class node_workspace_capacity,node_report_export,node_fabric_metrics,node_tenant_settings,node_security_demos,node_championship,node_report_features toneMint
```

## Components

### License governance

- [License audit script](https://github.com/pbi-guy/blog/blob/main/Save%20cost%20by%20removing%20unused%20licenses/Check%20User%20with%20PBI%20License.py): `Save cost by removing unused licenses/Check User with PBI License.py`
- **Microsoft Graph**
- **Activity log files**
- [Inactive license users](https://github.com/pbi-guy/blog/blob/main/Save%20cost%20by%20removing%20unused%20licenses/Check%20User%20with%20PBI%20License.py): `Save cost by removing unused licenses/Check User with PBI License.py`

### API operations

- [Activity log exporter](https://github.com/pbi-guy/blog/blob/main/Power%20BI%20and%20Activity%20Logs%20with%20Python/Save%20Log%20Files.py): `Power BI and Activity Logs with Python/Save Log Files.py`
- **Power BI REST API**
- [Daily CSV log](https://github.com/pbi-guy/blog/blob/main/Power%20BI%20and%20Activity%20Logs%20with%20Python/Save%20Log%20Files.py): `Power BI and Activity Logs with Python/Save Log Files.py`
- [Dataset refresh checker](https://github.com/pbi-guy/blog/blob/main/Power%20BI%20Dataset%20Refresh%20with%20Python/Power%20BI%20Dataset%20Refresh.py): `Power BI Dataset Refresh with Python/Power BI Dataset Refresh.py`
- [Refresh status](https://github.com/pbi-guy/blog/blob/main/Power%20BI%20Dataset%20Refresh%20with%20Python/Power%20BI%20Dataset%20Refresh.py): `Power BI Dataset Refresh with Python/Power BI Dataset Refresh.py`

### Power BI examples

- [Workspace capacity assignment](https://github.com/pbi-guy/blog/blob/main/Assign%20Power%20BI%20workspaces%20to%20a%20capacity%20automatically/Power%20BI%20Assign%20Workspaces%20to%20Capacity.ipynb): `Assign Power BI workspaces to a capacity automatically/Power BI Assign Workspaces to Capacity.ipynb`
- [PDF report export](https://github.com/pbi-guy/blog/blob/main/Export%20Power%20BI%20reports%20as%20PDF%20via%20REST%20API/Export%20Power%20BI%20Reports%20as%20PDF.ipynb): `Export Power BI reports as PDF via REST API/Export Power BI Reports as PDF.ipynb`
- [Fabric metrics extraction](https://github.com/pbi-guy/blog/blob/main/Extract%20data%20from%20the%20Fabric%20Metrics%20App/Save%20Fabric%20Metrics%20App%20Operations%20into%20OneLake.ipynb): `Extract data from the Fabric Metrics App/Save Fabric Metrics App Operations into OneLake.ipynb`
- [Tenant settings reports](https://github.com/pbi-guy/blog/tree/main/Tenant%20Settings%20Notification): `Tenant Settings Notification`
- [Security demonstrations](https://github.com/pbi-guy/blog/tree/main/Row%20Level%20Security): `Row Level Security`
- [Championship reports](https://github.com/pbi-guy/blog/tree/main/Power%20BI%20Championship/2022): `Power BI Championship/2022`
- [Report feature demos](https://github.com/pbi-guy/blog/tree/main/Power%20BI%20and%20Paginated%20Reports): `Power BI and Paginated Reports`

## Connections

- License audit script → Microsoft Graph: queries users (evidence: `Save cost by removing unused licenses/Check User with PBI License.py`)
- License audit script → Activity log files: reads logs (evidence: `Save cost by removing unused licenses/Check User with PBI License.py`)
- License audit script → Inactive license users: filters inactive users (evidence: `Save cost by removing unused licenses/Check User with PBI License.py`)
- License audit script → Microsoft Graph: removes licenses (evidence: `Save cost by removing unused licenses/Check User with PBI License.py`)
- Activity log exporter → Power BI REST API: fetches activities (evidence: `Power BI and Activity Logs with Python/Save Log Files.py`)
- Activity log exporter → Daily CSV log: writes daily CSV (evidence: `Power BI and Activity Logs with Python/Save Log Files.py`)
- Dataset refresh checker → Power BI REST API: checks refreshes (evidence: `Power BI Dataset Refresh with Python/Power BI Dataset Refresh.py`)
- Dataset refresh checker → Refresh status: checks status (evidence: `Power BI Dataset Refresh with Python/Power BI Dataset Refresh.py`)
- Dataset refresh checker → Power BI REST API: triggers refresh (evidence: `Power BI Dataset Refresh with Python/Power BI Dataset Refresh.py`)
