Manually register the Azure app and configure the Mondoo Microsoft 365 integration.
Choose the manual setup when you need full control over the app registration or your environment requires it. Most users should use the automated setup instead.
An Application Administrator or Cloud Application Administrator can register the app, but can't grant admin consent for Microsoft Graph application permissions or assign Global Reader. Ask a Global Administrator or Privileged Role Administrator to complete those steps.
Continuous M365 scanning requires a Microsoft Entra ID app registration. The registration creates a service principal that represents Mondoo in your tenant.
The setup is four steps: register the app, grant Microsoft Graph permissions, assign the Global Reader role, and create a certificate or client secret for Mondoo to authenticate with.
In the navigation sidebar, select API permissions.
By default, Microsoft grants your new application User.Read permission for Microsoft Graph. It's not required for Mondoo, so you can remove it.
Select + Add a permission.
From the list of Commonly used Microsoft APIs, select Microsoft Graph.
Because Mondoo acts as a service, select Application permissions.
Select expand all to see all permissions. Then select the required API permissions:
Microsoft Graph
Type
Description
Policy.Read.All
Application
Read your organization's policies
Policy.Read.PermissionGrant
Application
Read consent and permission grant policies
SecurityEvents.Read.All
Application
Read your organization's security events
DeviceManagementConfiguration.Read.All
Application
Read Microsoft Intune device configuration and policies
AuditLog.Read.All
Application
Read all audit log data
Directory.Read.All
Application
Read directory data
AccessReview.Read.All
Application
Read all access reviews
DeviceManagementServiceConfig.Read.All
Application
Read Microsoft Intune configuration
Domain.Read.All
Application
Read domains
Organization.Read.All
Application
Read organization information
OrgSettings-AppsAndServices.Read.All
Application
Read organization-wide apps and services settings
OrgSettings-Forms.Read.All
Application
Read organization-wide Microsoft Forms settings
UserAuthenticationMethod.Read.All
Application
Read all users' authentication methods
DeviceManagementApps.Read.All
Application
Read Microsoft Intune apps
DeviceManagementManagedDevices.Read.All
Application
Read Microsoft Intune devices
DeviceManagementRBAC.Read.All
Application
Read Microsoft Intune RBAC settings
IdentityRiskEvent.Read.All
Application
Read all identity risk event information
IdentityRiskyUser.Read.All
Application
Read all identity risky user information
InformationProtectionPolicy.Read.All
Application
Read all published labels and label policies for an organization
RoleManagement.Read.All
Application
Read role management data for all RBAC providers
SecurityAlert.Read.All
Application
Read all security alerts
SecurityIncident.Read.All
Application
Read all security incidents
EntitlementManagement.Read.All
Application
Read all entitlement management resources
Policy.Read.DeviceConfiguration
Application
Read your organization's device configuration policies
Domain-InternalFederation.Read.All
Application
Read internal federation configuration for a domain
TeamSettings.Read.All
Application
Read all teams' settings
ChannelSettings.Read.All
Application
Read the names, descriptions, and settings of all channels
Select the Add permissions button.
Grant Mondoo read permissions for SharePoint. Select + Add a permission, select SharePoint from the list of Commonly used Microsoft APIs, and then select Application permissions. Microsoft Graph has a permission with the same name, but it doesn't give Mondoo access to SharePoint settings. Make sure you add the one from the SharePoint API.
SharePoint APIs
Type
Description
Sites.FullControl.All
Application
Have full control of all site collections
Select the Add permissions button.
Grant Mondoo read permissions for Office 365 Exchange Online. You need to search in APIs my organization uses.
Office 365 Exchange Online
Type
Description
Exchange.ManageAsApp
Application
Run Exchange Online commands as if Mondoo was an administrator account
Select the Add permissions button.
Grant Mondoo read permissions for Microsoft Exchange Online Protection. You need to search in APIs my organization uses. This API is separate from Office 365 Exchange Online, and Mondoo needs both.
Microsoft Exchange Online Protection
Type
Description
Exchange.ManageAsApp
Application
Run Security & Compliance PowerShell cmdlets, such as reading DLP policies
Select the Add permissions button.
To complete the process, select Grant admin consent for (your tenant name) and select the Yes button to confirm.
Mondoo authenticates with a certificate or a client secret. A certificate is recommended: SharePoint Online refuses a token issued from a client secret, so with a client secret the SharePoint Online check reports an error while Exchange Online, Teams, and the rest of the tenant scan normally. To use a client secret instead, skip to Create a client secret.
Mondoo authenticates with a PEM certificate. You upload the certificate only to Azure, and the certificate plus private key to Mondoo. The PEM file you upload to Mondoo must use this format and order, with no password protection:
You need these values from the Azure app registration you created:
Application (client) ID
Directory (tenant) ID
The combined PEM file (private key + certificate), or the client secret
In the Mondoo App, navigate to the space where you want to add the integration. In the side navigation bar, select Integrations. In the top right, select INSTALL. On the Install Integration page, find the integration you want by browsing a category or searching by name:
Under SaaS Security, select Microsoft 365, then select the Manual Setup tab.
In Choose an integration name, enter a name that identifies the tenant.
Under Provide the app registration's credentials, choose where the credential comes from:
Enter a certificate or client secret: Select the Credential type, Certificate (PEM) or Client secret. Paste the Directory (tenant) ID in the Tenant ID box and the Application (client) ID in the Client ID (Application ID) box. For a certificate, select UPLOAD PEM FILE and choose the combined PEM file (private key plus certificate). For a client secret, enter it in the Client secret box. Mondoo stores what you enter as a credential in the space.
Use an existing credential: If the space already holds a credential for this app registration, select it instead. The tenant and client IDs come from the credential.
To learn more, read Manage Integration Credentials. If you can't create credentials in the space, the form doesn't offer these choices. It accepts a certificate only.
(Optional) Under Enable security policies (optional), enable the policies you want Mondoo to score your Microsoft 365 tenant against.
(Optional) Under Set Annotations (optional), select + ADD ANNOTATION to add key-value pairs that Mondoo applies to every asset this integration discovers. To learn more, read Annotate assets.
In the Mondoo App, select Integrations in the side navigation bar, then select Microsoft 365 and open your integration. Its status is Active when Mondoo can scan the tenant. Error means the last scan failed; check the integration page for the message.
When the first scan completes, your Microsoft 365 tenant appears on the INVENTORY page with its check results.
If the integration uses a client secret, the SharePoint Online check reports an error. That's expected; the rest of the tenant scans normally.
A certificate or client secret you create with the Azure CLI or in the Azure portal expires, by default after one year. When it expires, the integration stops scanning:
If a credential in the space manages the integration, Mondoo marks the credential Expired and shows a Scans are paused alert on the integration page: Credential "<name>" has expired. Rotate it to resume scanning. If Mondoo can't read the expiration date, it reports the credential as rejected instead: Credential "<name>" was rejected by the provider. Update it to resume scanning.
If the integration holds its certificate directly, its scans fail and its status changes to Error.
Renew the certificate or client secret before it expires:
Create a new certificate or client secret for the app registration. For example, to create a certificate in Azure Cloud Shell (substituting your application ID), run:
az ad app credential reset --id XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX --create-cert --years 1
The command prints the path of a PEM file that contains the private key and certificate. Download it with Cloud Shell's Manage files > Download. To create a client secret instead, omit --create-cert, and the command prints the new secret as password.
In the Mondoo App, navigate to Integrations > Microsoft 365 > your M365 integration and select the edit (pencil) icon.
Update the integration:
If the Authentication step says Managed by a credential, select the credential it links to, or open it in the space's Settings > Credentials. Select Rotate and enter the new certificate or client secret. Every integration that uses the credential switches to it. To learn more, read Manage Integration Credentials.
Otherwise, the integration holds its certificate directly. Under Certificate (optional update), select UPLOAD NEW CERTIFICATE FILE and choose the new PEM file, or paste the certificate PEM into the box. Then select SAVE CHANGES.