# manicharan0485/azure-m365-admin-scripts architecture

> Architecture diagram of the GitHub repository manicharan0485/azure-m365-admin-scripts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manicharan0485/azure-m365-admin-scripts
- Repository: https://github.com/manicharan0485/azure-m365-admin-scripts

## Overview

This repository is a collection of Microsoft 365 administration scripts, not a single integrated application. Its principal workflow is the Python compliance reporter: an operator supplies app credentials and an output directory, the script obtains a Graph token, collects compliance and identity data, then writes an HTML report. PowerShell scripts provide separate provisioning, auditing, remediation, licensing, permissions, and mail-flow tasks. Their internal behavior was not sampled, so those documented capabilities are shown without inferred call relationships.

Main entry points: [`python/reporting/m365_compliance_report.py`](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py) (Report CLI), [`powershell/entra-id/Bulk-UserProvisioning.ps1`](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/Bulk-UserProvisioning.ps1) (Bulk provisioning), [`powershell/entra-id/Device-ComplianceAudit.ps1`](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/Device-ComplianceAudit.ps1) (Device audit), [`powershell/entra-id/MFA-StatusReport.ps1`](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/MFA-StatusReport.ps1) (MFA status report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reporting["Compliance reporting"]
  node_reporter["Report CLI"]
  node_auth["App authentication"]
  node_collectors["Compliance collectors"]
  node_html["HTML report builder"]
  node_reportfile["HTML report file"]
end

subgraph group_entra["Entra ID administration"]
  node_provision["Bulk provisioning"]
  node_deviceaudit["Device audit"]
  node_mfareport["MFA status report"]
end

subgraph group_devices["Device compliance"]
  node_intunereport["Intune compliance report"]
end

subgraph group_tenant["Tenant operations"]
  node_licenseaudit["License audit"]
  node_permissions["Permission repair"]
  node_mailflow["Mail-flow connectors"]
end

node_operator(("Administrator"))
node_graph{{"Microsoft Graph"}}
node_m365{{"Microsoft 365 tenant"}}
node_userscsv["User CSV<br/>[sample_users.csv]"]

node_operator -->|"runs with credentials"| node_reporter
node_reporter -->|"requests token"| node_auth
node_auth -->|"acquires token"| node_graph
node_reporter -->|"calls collectors"| node_collectors
node_collectors -->|"queries Graph"| node_graph
node_reporter -->|"passes report data"| node_html
node_html -->|"writes HTML"| node_reportfile
node_operator -->|"runs provisioning"| node_provision
node_userscsv -->|"provides users"| node_provision
node_operator -->|"runs audit"| node_deviceaudit
node_operator -->|"runs report"| node_mfareport
node_operator -->|"runs report"| node_intunereport
node_operator -->|"runs audit"| node_licenseaudit
node_operator -->|"runs repair"| node_permissions
node_operator -->|"runs configuration"| node_mailflow
node_provision -.->|"manages users"| node_m365
node_deviceaudit -.->|"audits devices"| node_m365
node_mfareport -.->|"reports MFA"| node_m365
node_intunereport -.->|"reports compliance"| node_m365
node_licenseaudit -.->|"audits licenses"| node_m365
node_permissions -.->|"repairs permissions"| node_m365
node_mailflow -.->|"configures mail flow"| node_m365

click node_reporter "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py"
click node_auth "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py"
click node_collectors "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py"
click node_html "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py"
click node_provision "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/Bulk-UserProvisioning.ps1"
click node_deviceaudit "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/Device-ComplianceAudit.ps1"
click node_mfareport "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/MFA-StatusReport.ps1"
click node_intunereport "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/intune/DeviceCompliance-Report.ps1"
click node_licenseaudit "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/m365-licensing/License-AuditReport.ps1"
click node_permissions "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/sharepoint/BrokenInheritance-Fix.ps1"
click node_mailflow "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/exchange/MailFlow-Connector.ps1"
click node_userscsv "https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/sample_users.csv"

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_reporter,node_auth,node_collectors,node_html,node_reportfile,node_userscsv toneBlue
class node_provision,node_deviceaudit,node_mfareport toneAmber
class node_intunereport toneMint
class node_licenseaudit,node_permissions,node_mailflow toneRose
class node_operator,node_graph,node_m365 toneIndigo
```

## Components

### Compliance reporting

- [Report CLI](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py): `python/reporting/m365_compliance_report.py`
- [App authentication](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py): `python/reporting/m365_compliance_report.py`
- [Compliance collectors](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py): `python/reporting/m365_compliance_report.py`
- [HTML report builder](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/python/reporting/m365_compliance_report.py): `python/reporting/m365_compliance_report.py`
- **HTML report file**

### Entra ID administration

- [Bulk provisioning](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/Bulk-UserProvisioning.ps1): `powershell/entra-id/Bulk-UserProvisioning.ps1`
- [Device audit](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/Device-ComplianceAudit.ps1): `powershell/entra-id/Device-ComplianceAudit.ps1`
- [MFA status report](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/MFA-StatusReport.ps1): `powershell/entra-id/MFA-StatusReport.ps1`

### Device compliance

- [Intune compliance report](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/intune/DeviceCompliance-Report.ps1): `powershell/intune/DeviceCompliance-Report.ps1`

### Tenant operations

- [License audit](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/m365-licensing/License-AuditReport.ps1): `powershell/m365-licensing/License-AuditReport.ps1`
- [Permission repair](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/sharepoint/BrokenInheritance-Fix.ps1): `powershell/sharepoint/BrokenInheritance-Fix.ps1`
- [Mail-flow connectors](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/exchange/MailFlow-Connector.ps1): `powershell/exchange/MailFlow-Connector.ps1`

### Other components

- **Administrator**
- **Microsoft Graph**
- **Microsoft 365 tenant**
- [User CSV](https://github.com/manicharan0485/azure-m365-admin-scripts/blob/main/powershell/entra-id/sample_users.csv): `powershell/entra-id/sample_users.csv`

## Connections

- Administrator → Report CLI: runs with credentials (evidence: `python/reporting/m365_compliance_report.py`)
- Report CLI → App authentication: requests token (evidence: `python/reporting/m365_compliance_report.py`)
- App authentication → Microsoft Graph: acquires token (evidence: `python/reporting/m365_compliance_report.py`)
- Report CLI → Compliance collectors: calls collectors (evidence: `python/reporting/m365_compliance_report.py`)
- Compliance collectors → Microsoft Graph: queries Graph (evidence: `python/reporting/m365_compliance_report.py`)
- Report CLI → HTML report builder: passes report data (evidence: `python/reporting/m365_compliance_report.py`)
- HTML report builder → HTML report file: writes HTML (evidence: `python/reporting/m365_compliance_report.py`)
- Administrator → Bulk provisioning: runs provisioning (evidence: `README.md`)
- User CSV → Bulk provisioning: provides users (evidence: `README.md`)
- Administrator → Device audit: runs audit (evidence: `README.md`)
- Administrator → MFA status report: runs report (evidence: `README.md`)
- Administrator → Intune compliance report: runs report (evidence: `README.md`)
- Administrator → License audit: runs audit (evidence: `README.md`)
- Administrator → Permission repair: runs repair (evidence: `README.md`)
- Administrator → Mail-flow connectors: runs configuration (evidence: `README.md`)
- Bulk provisioning → Microsoft 365 tenant: manages users (evidence: `README.md`)
- Device audit → Microsoft 365 tenant: audits devices (evidence: `README.md`)
- MFA status report → Microsoft 365 tenant: reports MFA (evidence: `README.md`)
- Intune compliance report → Microsoft 365 tenant: reports compliance (evidence: `README.md`)
- License audit → Microsoft 365 tenant: audits licenses (evidence: `README.md`)
- Permission repair → Microsoft 365 tenant: repairs permissions (evidence: `README.md`)
- Mail-flow connectors → Microsoft 365 tenant: configures mail flow (evidence: `README.md`)
