PROJECT 13 IDENTITY & AUTOMATION

Microsoft 365Graph AdministrationLab

From delegated access to dependable directory reporting. Read-only Microsoft Graph automation, test-driven PowerShell development, and inspectable evidence.

SOURCE LIBRARY07Retained reporting scripts
TEST SUITE 08/08Pester tests passed
NEW EXTENSION01JSON export application
ACCESS MODELREADDelegated, read-only scope

01 / FOUNDATION

Objective and implementation

Build reusable read-only Microsoft 365 reporting in PowerShell. Technologies: Microsoft.Graph.Authentication, delegated Graph scopes, REST GET requests, hashtable response handling, and CSV export.

The seven retained scripts cover tenant inventory, users, groups, licensing, directory roles, stale accounts, and Intune managed devices. Script inspection confirms reporting implementation. The tenant summary reads first-page collections without pagination for several counts; it is not presented as a complete large-tenant inventory solution.

Troubleshooting and code review

The notes document a role-members query returning 400 with a top parameter and a signInActivity request returning 403 without AuditLog.Read.All. The role script omits the problematic top parameter; stale-account and Intune scripts compare required scopes and reconnect. The original seven-script evidence review did not rerun these scripts against a tenant. Their historical live CSV output remains withheld. The newer JSON export was separately tested with mocked data and a point-in-time live directory retrieval.

02 / VERIFIED EXTENSION

Microsoft Graph development · Tested automation

A reusable, read-only PowerShell user inventory export now complements the seven retained administration scripts. The extension validates delegated User.Read.All access, retrieves directory users through Microsoft Graph, and generates a structured JSON report. Generated tenant reports remain excluded from the public repository.

PASS 8/8

Automated test validation

8/8PASSING

Validated locally with Pester 6.2.0 after merging into main: three function tests and five JSON report checks; zero failures and zero skipped. Tests use mocked Graph responses and synthetic records, rather than live tenant data.

A separate live delegated session retrieved 24 users at the time of testing. This is a point-in-time validation, not a claim about the tenant's current user count.

03 / SYSTEM DESIGN

Architecture of a read-only export

Four clear boundaries keep authentication, collection, reporting, and verification separate.

01 / EXECUTEPowerShell 7Script entry point
02 / AUTHORIZEGraph sessionDelegated User.Read.All
03 / RETRIEVEDirectory usersGet-MgUser -All
04 / EXPORTJSON reportLocal, ignored output

Pester tests exercise the authentication guards and report structure using mocked or synthetic data. Live tenant records are not committed to the site.

Scope and limitations

Read-only delegated administration/reporting is currently proven. Live CSV exports are intentionally not public because they may contain UPNs, object IDs, device identifiers, and tenant-specific data. Do not imply write automation or broader Graph coverage that has not been validated.

Registry status retained in the audit: COMPLETE — validated read-only Microsoft Graph administration and reporting automation. The new development extension adds independently executed Pester tests; the original evidence below remains preserved.

Read the retained project registry and its stated scope

04 / SOURCE EVIDENCE

Tasks, results, and supporting proof

Eight preserved source artifacts, each linked to its original code or troubleshooting record. Expand provenance to inspect source paths and hashes.

ARTIFACT / 01SOURCE VERIFIED

Evidence 1

The supplied Get-EntraRoleInventory.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-EntraRoleInventory.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-EntraRoleInventory.ps1

SHA-256: d3cbd65b9931b0c785ed24376dca9afb103591fb25cb0ff5f81b410305cbe845

ARTIFACT / 02SOURCE VERIFIED

Evidence 2

The supplied Get-EntraStaleAccounts.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-EntraStaleAccounts.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-EntraStaleAccounts.ps1

SHA-256: cf3eddf6b2114fdf17ba884e69158c3c1b25cfddce4e26e045fbb1140c6787bb

ARTIFACT / 03SOURCE VERIFIED

Evidence 3

The supplied Get-IntuneManagedDeviceInventory.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-IntuneManagedDeviceInventory.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-IntuneManagedDeviceInventory.ps1

SHA-256: 141f67214f3c17486cfdd23f3024a29ec57065e1370b5f0f9b2e1f02cf320e91

ARTIFACT / 04SOURCE VERIFIED

Evidence 4

The supplied Get-M365GroupMembership.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-M365GroupMembership.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-M365GroupMembership.ps1

SHA-256: e771f7b170f60b3af28026a63fe24543c87e231739e3051c3696c0d2a7aa699d

ARTIFACT / 05SOURCE VERIFIED

Evidence 5

The supplied Get-M365LicenseAssignment.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-M365LicenseAssignment.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-M365LicenseAssignment.ps1

SHA-256: 6d07dee99536cdd1b0f55b76e6351aa3975880418148dda9e982c35e2c80737c

ARTIFACT / 06SOURCE VERIFIED

Evidence 6

The supplied Get-M365TenantInventory.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-M365TenantInventory.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-M365TenantInventory.ps1

SHA-256: f742f8a458881767e0637899cb71604ba01a6f0ef301e9cefc3dd7643d2a0170

ARTIFACT / 07SOURCE VERIFIED

Evidence 7

The supplied Get-M365UserInventory.ps1 implements read-only Graph reporting; retained documentation reports validation, while live CSV output is withheld.

Open Get-M365UserInventory.ps1confirmed code inspection of GET requests, scopes and reporting; source code does not independently prove successful live execution
Provenance

Source: projects/m365-graph-administration-lab/scripts/Get-M365UserInventory.ps1

SHA-256: 8cb9c5022317f46297a650e9fb0f9038286f6b4d2626c7b40ba4e702c2238921

ARTIFACT / 08SOURCE VERIFIED

Evidence 8

Retained troubleshooting notes document correcting directory-role membership query parameters and adding a missing sign-in activity scope.

Open Troubleshooting.mddocumentary support confirmed; no raw execution transcript supplied
Provenance

Source: projects/m365-graph-administration-lab/docs/Troubleshooting.md

SHA-256: 9854cc86e4f9151a0f15069efdb02ffe0fbe6c3fc94a5cc950e2e8e6028af8c4

Top