Skip to main content

Part 1: Microsoft 365 Data Ingestion

Set up a Microsoft 365 app so ConfigView can pull your Microsoft 365 data into the dashboard.

Step 1: Create an App or Token

This setup explains how to register and configure an application in Microsoft Entra ID (Azure AD).
  1. Retrieve your Tenant ID.
  2. Create a new App Registration in Azure AD for ConfigView.
  3. Create a Client Secret for the application and copy its value.
  4. Assign the required Read-Only permissions for Microsoft Graph APIs and Microsoft 365 data (Users, Groups).
  5. Grant admin consent for the selected permissions.

Step 2: Add the Token to ConfigView

  1. Go to your ConfigView dashboard: https://{companyname}.configview.com/admin/integrations/microsoft-365
  2. Under Credentials, enter each value and click the save icon on its row:
MSFT_CLIENT_SECRET_VALUE holds the client secret value, not the secret’s ID. Azure shows both on the same screen and only displays the value once — copy the Value column, not Secret ID.

Step 2b: A second Microsoft tenant (optional)

If you have two Microsoft tenants, the Microsoft 365 - 2 app collects the second one into parallel _2 tables (msft_users_2, msft_managed_devices_2, …). It needs its own app registration in the second tenant, and its own secrets: Graph permissions are granted per app registration, not per organisation. Every permission in the tables below has to be added and admin-consented separately on the second app registration. A tenant that works for one script family and 403s for another is almost always a permission granted on only one of the two registrations. Which tenant is “1” and which is “2” is just the order they were configured — there is nothing inherently primary about the unsuffixed one. If your production tenant is configured as the second one, the reports that matter are the _2 variants (microsoft2.* seeds and coverage.msft2_*), and the unsuffixed reports will describe the other tenant. Worth confirming which is which before acting on a Microsoft report.

Step 3: Enable the Microsoft 365 App in ConfigView

  1. Go to: https://{companyname}.configview.com/admin/integrations/microsoft-365
  2. Click Connect. ConfigView creates its tables and schedules every collector at your default run time.
  3. Click Verify now to confirm the credentials work.

Step 4: Verify

  1. Go to: https://{companyname}.configview.com/admin/status/
  2. Run the Microsoft 365 health check.
  3. All checks should pass.
If a check fails, verify that your secrets are saved correctly and the app has the required permissions.

Required Microsoft Graph Permissions

All permissions below are Application (app-only) permissions, used with the client credentials flow. After adding any permission, click Grant admin consent in the Azure portal. Only add the permissions for the scripts you intend to enable. Some endpoints additionally require an Entra ID P2 license (noted below).

Core identity & inventory

Tenant settings & policy

microsoft_get_consent_requests collects the same list the Entra portal shows under Enterprise applications → Admin consent requests — which app was requested, by whom, their written justification, the approve/deny verdict and who reviewed it. It is request history, not just what is pending: Completed and Expired requests going back years are returned alongside InProgress ones.
ConsentRequest.Read.All is the least-privileged permission for these two endpoints and is what we recommend granting. It is not the only one that works: a tenant whose app registration already holds the much broader Directory.Read.All can read both endpoints without adding anything — verified on both Thrive tenants 2026-09-18, where the collectors return data on Directory.Read.All alone. If you are choosing, prefer ConsentRequest.Read.All.
microsoft_get_admin_consent_request_policy collects the workflow’s own configuration, and is the reason an empty request list is readable. If isEnabled is 0 the admin consent workflow is switched off in that tenant and an empty msft_consent_requests is the correct answer rather than a collection failure. Check that column before investigating an empty table.
These two collectors are paced more tightly than the rest of the folder. The identityGovernance endpoints throttle on a burst window — roughly 23 requests per 10 seconds, measured — and each consent request needs its own follow-up call for the requester and verdict. A tenant with a few dozen requests takes under a minute.

Roles & PIM

Licenses & billing

Microsoft does not expose full invoice/payment billing through Graph. For invoices and usage charges, use the Microsoft 365 admin center or Partner Center APIs.

Mailboxes & calendars

microsoft_get_calendars reads the calendar list for each mailbox — one row per calendar, with its name, owner, and sharing flags. It does not read events, so no meeting subjects, bodies, or attendee lists enter your database. Calendars.ReadBasic is enough to collect it. Granting Calendars.Read as well fills in three columns that ReadBasic withholds — canEdit, canViewPrivateItems, and changeKey — which stay NULL under ReadBasic rather than defaulting to false. Note that Calendars.Read is the permission whose portal description reads “Read calendars in all mailboxes”; there is no permission literally named Calendars.ReadAll. Both are Application permissions and both grant tenant-wide mailbox access. To narrow that, scope the app registration with an application access policy so it can only reach a chosen mail-enabled security group. Mailboxes outside the policy return 403 and are skipped without failing the run.

OneDrive / SharePoint / external sharing

microsoft_get_sharing_links finds every file and folder in OneDrive and SharePoint that carries its own sharing, and records one row per sharing link or direct grant: the link scope (anyone with the link, people in your organisation, or specific people), view or edit, expiry, whether it has a password, and who it is shared with (email address). It never downloads a file and never stores the link URL itself, since an “anyone” link URL is the access. It walks each drive with the Graph delta query and reads permissions only for items Graph marks as shared, and depends on microsoft_get_user_drives and microsoft_get_sites having run. On a very large tenant a run stops starting new drives after 25 minutes and mails a “partial run” notice; raise or lower that with the optional MSFT_SHARING_TIME_BUDGET_S setting.

Audit & sign-ins

Tenants without Entra ID P1/P2 (Office 365 E1, Microsoft 365 Business Basic, Teams Essentials and similar): Microsoft only exposes the Entra sign-in log to premium tenants, so microsoft_get_sign_ins has nothing to read there. It now finishes cleanly with a note instead of failing, and microsoft_get_audit_sign_ins reads the same sign-ins (successful and failed) from the Microsoft 365 unified audit log into msft_audit_sign_ins: user, app, IP address, result, error, browser and device OS. Grant AuditLogsQuery.Read.All (Application) with admin consent; unified auditing is on by default in Microsoft 365. How it runs:
  • Only where it is needed. On a premium tenant, where the Entra sign-in log answers, the audit-log collector does nothing. Set MSFT_AUDIT_SIGN_INS_MODE=always to collect the audit-log copy on every tenant, or off to disable it.
  • Incremental. The first run reaches back 179 days (Microsoft rejects searches of 180 days or more) and can take around 15 minutes. Each later run asks only for the time since the newest stored sign-in, with a 24-hour overlap for late audit records. Rows are de-duplicated on the audit record id, so the overlap never double-counts.
  • Long searches carry over. If Microsoft has not finished the search before the run’s time limit, the run ends with a “partial” notice and the next run collects the same search.

Usage reports (last Microsoft 365 activity)

The last date each user was active in Exchange, OneDrive, SharePoint, Teams, Yammer and Skype over the past 180 days (lastActivityDate is the latest of them), plus which of those services they are licensed for. It works on every tenant, premium or not, so it is the way to find idle accounts where signInActivity is unavailable. Microsoft conceals user names in usage reports by default; ConfigView matches the concealed names back to your users itself (upnConcealed = 1 marks those rows), so you do not need to change the tenant’s report privacy setting.

Security & identity protection

Teams & communications

Usage reports (Microsoft 365 Copilot)

These read the Microsoft 365 Copilot usage reports from the Graph beta reports endpoint, which Microsoft can change without notice. The reports show per-user activity counts (which Copilot apps a user used and when). Without Reports.Read.All the Reports.Read.All health check fails with 403 and the two Copilot usage tables stay empty; every other collector is unaffected.

Intune device policies

App protection covers iOS and Android policies (Windows Information Protection is retired by Microsoft and not collected). Autopilot rows never include the device’s product key or hardware hash.

Identity governance

Access reviews are collected one row per review run, so a review that is past its end date and was never completed shows up as overdue. Individual reviewer decisions are not collected.
After granting any new permissions in Azure AD, restart the satellite (or wait for the next cron run) — tokens are cached per script invocation and will pick up the new scopes on the next run.

Device inventory: which table joins to other systems

Device.Read.All and DeviceManagementManagedDevices.Read.All return different things, and only one of them is useful for cross-system device reporting: So msft_managed_devices is the only Microsoft table that can be joined to an MDM or EDR inventory by serial. If you want reports like “Intune devices with no CrowdStrike agent” (coverage.msft_missing_crowdstrike), you need the Intune permission — Device.Read.All alone will not do it. Matching msft_devices.displayName against an EDR hostname instead is not a workable substitute; measured against a real tenant it matched under 20% of devices.

Troubleshooting an empty msft_managed_devices

An empty Intune table has two very different causes, and the collector’s own output distinguishes them:
  • Fetched 0 devices and the run succeeds — the permission is fine and the tenant genuinely has no Intune-enrolled devices. Common on tenants that use a different MDM (Jamf, Iru, Workspace ONE) or on a sandbox tenant. Nothing to fix.
  • 403 Client Error: Forbidden on /deviceManagement/managedDevices — the app registration is missing DeviceManagementManagedDevices.Read.All, or it was added without clicking Grant admin consent. Note Device.Read.All does not cover this endpoint; an app can hold it and still 403 here.
To check a grant without waiting for a scheduled run, decode the roles claim of an app-only token — it lists exactly the application permissions that were consented:

Directory discovery

microsoft_get_directories builds an inventory of the Entra directories around your tenant — their names, default domains and identity providers — into msft_directories. It resolves each one through Microsoft Graph’s cross-tenant lookup, which answers for any directory without consent in it, so a directory appears here whether or not ConfigView collects it. It finds candidates six ways: the guest accounts in your own tenant (the directories your guests come from), the homeTenantId on cross-tenant sign-ins, the partner tenants in your cross-tenant access settings, the other tenants in your multi-tenant organization, the home tenants of outside people in your Teams chats, and a list you supply. The list matters because no app-only credential can enumerate directories — the Azure portal’s Directories + subscriptions switcher is a view of the signed-in person’s memberships, not something an API exposes. A certificate or sandbox tenant that has never invited a guest and never had a sign-in is invisible until you name it. Set the optional secret MSFT_KNOWN_DIRECTORIES (and MSFT_KNOWN_DIRECTORIES_2 for the second tenant) to a comma-separated list of tenant IDs or domains, copied from that portal page:
The table records which source vouched for each directory in discovered_via, so a row that exists only because you seeded it is distinguishable from one your own data found. The payload is a directory’s public identity only — never its users, subscriptions or resources, which still require an app registration and role assignment inside it.

Cross-tenant access settings

Two collectors read the External Identities → Cross-tenant access settings page with the Policy.Read.All permission the other policy collectors already use, so nothing new has to be granted.
  • microsoft_get_cross_tenant_access_default → msft_cross_tenant_access_default: the tenant-wide default that applies to every outside tenant without settings of its own.
  • microsoft_get_cross_tenant_access_partners → msft_cross_tenant_access_partners: one row per outside tenant with its own (organizational) settings. A blank value means the tenant inherits the default.
For B2B collaboration (guest invitations) and B2B direct connect (Teams shared channels), inbound and outbound, each row records whether users and apps are allowed or blocked, and whether that applies to everyone or to a selection (everyone else gets the opposite). It also records whether MFA, compliant devices and hybrid joined devices from the other tenant are trusted, and whether invitations are redeemed automatically. Only setting types and user, group or application IDs are stored, never names or filter rules. The catalog answers “is inbound B2B open to everyone?”, “which outside tenants can our users collaborate with?” and flags defaults loosened beyond Microsoft’s baseline (direct connect open to all, or MFA or devices trusted from every tenant). Partner tenants are also fed into directory discovery, so each one shows a name and domain.

Multi-tenant organization

If your company runs several Microsoft tenants and has joined them into a multi-tenant organization (Entra admin center → Cross-tenant synchronization / Multitenant organization), two collectors record how they relate. They need the MultiTenantOrganization.Read.All application permission (Directory.Read.All also works). The ReadBasic variant is delegated-only and hides pending tenants, so grant Read.All.
  • microsoft_get_multi_tenant_org → msft_multi_tenant_org: one row per run with the organization’s name, state and creation date, plus this tenant’s own join request (its role, whether it has joined, and whether the join failed).
  • microsoft_get_multi_tenant_org_tenants → msft_multi_tenant_org_tenants: one row per tenant in the organization, with its role (owner or member), state (pending, active or removed), when it was added and joined, and any join or role change that is still running or failed. Pending tenants are included.
An empty result is normal. Separate tenants that were never joined into a multi-tenant organization report state inactive and no member tenants. That is a correct answer, not a fault, and the health check passes. Only IDs, names, roles, states, dates and Microsoft’s status text are stored. The organization’s free-text description is not. The catalog answers “are our tenants in a multi-tenant organization, and who owns it?”, “which tenants are in it?” and “which joins have not finished?”. The last one lists tenants that were added but never joined, failed or running changes, and this tenant’s own join request when it is not active. Each instance (microsoft-365, microsoft-365-2) records its own view, and member tenants are also fed into directory discovery.

Teams chats and who is in them

Microsoft only lets an app list chats per user (/users/{id}/chats), so both chat collectors walk every member account in the tenant and count each chat once. They use the Chat.ReadBasic.All application permission (Chat.Read.All also works). Neither one reads messages.
  • microsoft_get_chats → msft_chats: one row per chat (one-on-one, group or meeting), with its type and when it was created and last active. Meeting join links are not kept.
  • microsoft_get_chat_members → msft_chat_members: one row per chat per member, with the member’s email, name, home tenant and role. is_external is 1 for users of another Microsoft tenant (Teams external access), anonymous meeting guests and personal Microsoft accounts; is_guest is 1 for guest accounts in your own tenant.
The catalog answers “which Teams chats have external or guest participants?”, “who outside the company do our users chat with?” and, for one person, “which chats are they in and with whom?”. The home tenants of outside chat members also feed directory discovery, so each one shows an organisation name.

Data Tables

Once the scripts run, the corresponding Microsoft 365 tables will be created in your database. All tables include a run_at column for historical tracking.