๐๏ธ Recipe ยท Microsoft 365 Governance
Generate a Comprehensive Microsoft 365 Tenant Health Summary
Aggregate license utilization, inactive users, privileged exposure, device compliance, risky sign-ins, credential expirations, and storage trends into a single audit-ready report
Complexity
Advanced
Impact
governance + security + cost-optimization + compliance + read-only + audit
Context
Why This Matters
A tenant health summary is a cross-domain snapshot of the signals that most commonly drive security incidents, license waste, and compliance findings in Microsoft 365. Rather than opening seven separate admin centers, this recipe aggregates the key indicators into a single report you can deliver to security, finance, and leadership stakeholders.
Run this recipe:
- Monthly as part of a standing governance review.
- Quarterly before license renewals to surface downgrade and reclamation opportunities.
- Ad hoc during M&A, audits (SOC 2 / ISO 27001), or after a security incident.
- On onboarding when you inherit a tenant and need a baseline.
The summary covers seven domains: license utilization efficiency, inactive users (90+ days), privileged account exposure, unmanaged/non-compliant devices, risky sign-ins (last 30 days), app registration certificate and secret expirations, and SharePoint storage growth trends.
Expected Outcomes
After completing this recipe you will have:
- A structured JSON/CSV report file containing all seven health domains with timestamps and tenant identifier.
- Quantified license utilization per SKU and a list of downgrade/reclamation candidates.
- A list of enabled accounts with no sign-in in 90+ days (license waste and attack-surface candidates).
- A full inventory of Global Administrators and other privileged role holders, with counts benchmarked against Microsoft's recommendation (โค4 Global Admins).
- A reconciliation of Entra-registered vs. Intune-managed devices, with unmanaged devices called out.
- Every risky sign-in in the last 30 days with user, IP, location, risk level, and remediation state.
- App registrations whose certificates or client secrets expire in the next 30โ90 days.
- SharePoint storage growth over the last 30 days, including any anomalous spikes.
- A prioritized list of remediation actions (High / Medium / Low).
Risks & Considerations
โ ๏ธ Warnings and Gotchas
- Read-only report โ safe to run, but the data it exposes (admin lists, user sign-in data, IP addresses) is highly sensitive. Store the output in a controlled location and share only with authorized reviewers.
- signInActivity is only populated for Entra ID P1/P2 tenants. Free-tier tenants will not have
lastSignInDateTimedata and the inactive-users section will be empty. - Identity Protection (riskyUsers / riskySignIns) requires Entra ID P2. Without P2, fall back to querying
auditLogs/signInswithriskLevelDuringSignIn ne 'none'. - Report anonymization: If
displayConcealedNamesis enabled in/admin/reportSettings, user and site names in usage reports will be hashed. Set it tofalse(temporarily) if you need readable names. - Do NOT act on inactive-user data without verification. Service accounts, shared mailboxes, and break-glass admins may legitimately have no interactive sign-ins. Cross-reference with group membership and license assignment before disabling.
- Do NOT reduce Global Admin count below 2. Always retain at least two break-glass accounts that are cloud-only, excluded from Conditional Access, and have complex stored credentials.
- Compliance: Sign-in log data is subject to data residency and retention policies. Do not export it to uncontrolled storage (personal OneDrive, email).
Required Permissions
| Permission | Why It's Needed |
|---|---|
| Organization.Read.All | Read subscribedSkus for license utilization |
| User.Read.All | Enumerate users and read signInActivity for inactive-user detection |
| AuditLog.Read.All | Read sign-in logs for risky sign-in analysis |
| Directory.Read.All | Read directory roles and privileged role members |
| DeviceManagementManagedDevices.Read.All | Read Intune managed device inventory and compliance state |
| Device.Read.All | Read Entra ID registered devices for unmanaged-device reconciliation |
| Application.Read.All | Read app registrations including keyCredentials and passwordCredentials expirations |
| Reports.Read.All | Read SharePoint, OneDrive, and mailbox usage reports |
| IdentityRiskyUser.Read.All | Read riskyUsers and riskyDetections from Identity Protection (Entra ID P2) |
The fastest way to get this done โ just ask Dex. Copy the prompt below and paste it into your Dex conversation.
For IT Admins
Paste into Dex CoAdmin