This article provides prerequisites and onboarding steps for Microsoft 365 Direct.

Step 1: Enable Microsoft 365 audit logging

Audit logging is required for Expel to provide detection and investigative value for Microsoft 365. The Microsoft 365 audit log records user and admin activity and holds the data for 90 days. Audit logging could already be running on your Microsoft 365 installation. So, the first thing to do is verify.

Verify Microsoft 365 audit logging status

Use the Verify the auditing status for your organization instructions from Microsoft 365 support.

  • If audit logging is ON, skip to Step 2: Enable 0365 Enterprise Application.

  • If audit logging is OFF, follow the Enable Microsoft 365 audit logging instructions.

Enable Microsoft 365 audit logging

You can use either the Microsoft 365 Security and Compliance Center or the Exchange Online PowerShell to activate audit logging.


If you prefer PowerShell, skip to Option 2.

Option 1: Enable audit logging in Microsoft 365 Security and Compliance Center in 5 steps

  1. Log to the Microsoft 365 Admin Portal with a global admin user or at minimum, a user with the Organization Management or Compliance Management roles.

  2. Navigate to the Security & Compliance Center.

  3. Navigate to Search & investigation > Audit log search.

  4. Click Start recording user and admin activities.

  5. That’s it! Microsoft 365 makes some changes behind the scenes and begins recording activity in the audit log.


    This change can take about 24 hours to complete.

Option 2: Enable audit logging in Microsoft 365 with PowerShell in 3 steps

  1. Connect to Exchange Online PowerShell.

  2. Run the following PowerShell command to turn on audit log search in Microsoft 365:

    Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true
  3. That’s it! A message appears saying it can take up to 60 minutes for the change to take effect.

Step 2: Enable Microsoft 365 Enterprise Application

To integrate Microsoft 365 Direct with Expel, we need to create secure credentials to the API. We provide 2 options for enabling API access:

  • Option 1: Enable the Expel Microsoft 365 Integration Enterprise Application within Azure.

  • Option 2: Create a custom Azure Active Directory (AD) Application.

Usually enabling the Enterprise Application (option 1) is the recommended approach. The second option is offered for cases where the absolute minimum permissions are required. In either case, the table below shows the required items to obtain during this step:

Item we need


Azure Directory (tenant) ID

A unique identifier for your Azure instance. Expel needs this information to route our API requests to the right place.

Application (client) ID (Option 2 only)

A unique identifier for the application you create that grants Expel the access it needs to your Microsoft 365 instance.

Application (client) Secret (Option 2 only)

The API secret that allows Expel to authenticate as the created application to your Microsoft 365 instance.

Option 1: Enable Microsoft 365 integration (preferred)

  1. As an Administrator, navigate to the Expel Admin Consent Page.

  2. Review and accept requested permissions.

  3. The Expel Microsoft 365 Integration app now appears under Enterprise Applications. Review properties and make sure that all permissions were properly granted. Note the Directory (Tenant) ID when viewing the Expel Microsoft 365 Integration application for use in later steps.

  4. Skip to step 3.

Option 2: Create Custom Microsoft Entra ID Application

  1. Log into your Azure Active Directory account ( and open Microsoft Entra ID.

  2. Navigate to App registrations and create a new app by clicking + New registration.

  3. Fill in the application details. You can technically fill these in however you want, but we recommend the following:

    • Name: Expel Cloud Service.

    • Supported account types: Accounts in this organizational directory only (first option).

  4. After you fill out the fields, click Register to create the new application.

  5. You navigate automatically to the settings page for the Expel Cloud Service app you just created. If not, navigate to Azure Active Directory > App Registrations > View all applications (if you don’t see the new app) > Expel Cloud Service.

  6. Make a note of the Application (client) ID and the Directory (tenant) ID. We need that later.

  7. Navigate to API permissions and click Add a permission.

  8. Add these permissions for the Expel App.

    • Microsoft Graph API

      • AuditLog.Read.All

      • Directory.Read.All

      • Group.Read.All

      • IdentityRiskEvent.Read.All

      • SecurityEvents.Read.All

      • User.Read.All

    • Microsoft 365 Management APIs

      • ActivityFeed.Read

      • ActivityFeed.ReadDIp

      • ServiceHealth.Read

  9. Select the appropriate API Category (for example, Microsoft Graph).

  10. Select Application Permissions.

  11. Select the appropriate permission(s) and click Add Permissions.

  12. Repeat these steps for each permission needed. Verify that:

    • All permissions are added as Application permissions and NOT Delegated permissions.

    • All Permissions are assigned.

    • Consent is granted for the permissions by the AAD admin.

  13. After permissions are assigned, click Grant admin consent, and Yes at the prompt.

  14. Navigate to Expel Cloud Service > Certificates & secrets to begin creating an API key (aka client secret). To create a new key, click +New client secret.

  15. Add a description for the secret (like Expel API) and select 24 months for expiration. Click Add to create the secret.

  16. You see a new client secret (API Key) appear under Client secrets.


    Copy the value and save it for later. It disappears after you navigate away from this screen.

Step 3: Configure Microsoft 365 Direct in Expel Workbench


Expel secures all login information our SOC analysts need about your devices in an MFA password product. Access to this login information is protected using our internal MFA processes. To learn more about the IP addresses all Expel traffic comes from, go here.

  1. In a new browser tab, log into The Add Security Device page for Microsoft 365 (direct) appears.

  2. Use this table to complete the fields.

    Field Name

    What to put in it


    Select Expel Cloud Service from the list.


    What you want to name the security device.


    Microsoft Cloud

    Tenant ID

    Azure Directory (tenant) ID from Option 1 or Option 2.

    Client ID (Option 2 only)

    The Azure Application (client) ID created in Option 2.

    Client Secret (Option 2 only)

    The Application (client) Secret created in Option 2.

  3. Click Save.

Step 4: Configure Microsoft Entra ID Protection in Expel Workbench (Premium P2 license required)

  1. In a new browser tab, login to The Add Security Device page for Microsoft Entra ID Protection appears.

  2. Refer to the table in the previous step to complete the fields.

  3. Click Save.


This article was accurate at the time of writing, but changes happen. If you find the instructions are outdated, leave a description in the comment field below and let us know!

O 365, O365, Office365, ms 365, microsoft 365