--- title: "Configure Microsoft Office 365" slug: "configure-microsoft-office-365" tags: ["ESM", "Reference"] updated: 2026-10-27T15:50:49Z published: 2026-10-27T15:50:49Z canonical: "docs.trellix.com/configure-microsoft-office-365" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Configure Microsoft Office 365 Sending logs from Microsoft Office 365 using API requires access to the Microsoft Office Azure portal with administrator rights. ### Important Before you begin, configuring this data source requires: - Trellix ESM version 10.1.0 or later - Access to the Microsoft Office Azure portal with administrator rights 1. In the Microsoft Azure portal, navigate to **Azure Active Directory**. If **Azure Active Directory** is not visible in the left menu, click **More Services** then search for it. 2. From the Active Directory submenu, click the **Properties** tab. 3. Copy the **Directory ID** value to use as the **Tenant ID** when setting up Trellix ESM for the Microsoft Office 365 data source. 4. Navigate to App registrations. 5. Add an application. 6. Click **New application registration**. 7. Name the application. 8. Select the **Web app/API** type. 9. In **Sign-on URL** , enter [http://localhost:1234](http://localhost:1234). 10. Click **Create** at the bottom of the screen. 11. Select the newly created application. 12. Copy and save the **Application ID** to use as the **Client ID** when setting up Trellix ESM for the Microsoft Office 365 data source. 13. Enable Trellix ESM to pull event data. 14. Click **Required permissions**. 15. Click **Add** at the top of the screen. 16. From **Add API Access**, click **Select an API**. 17. Search for and select **Office 365 Management APIs**. Then click **Select** at the bottom of the screen. 18. In Required Permissions, select **Office 365 Management APIs**. 19. Enable all **Application Permissions**. 20. Enable all **Delegated Permissions** then click **Save** at the top of the screen. 21. Work with your administrator to grant the application new permissions by clicking **Grant Permissions** at the top of the screen. 22. Set up a security key. 23. Click **Keys** on the application settings. 24. Enter a key description and select a duration. 25. Click **Save**. 26. On the next screen, save the secret key value to a secure location for future reference. ### Note The secret key value does not appear again. Trellix ESM requires the secret key to set up the Microsoft Office 365 data source. 27. To get collected data for Microsoft Office 365 subscriptions to specific content types, use a tool that can send API POST and GET comments. Starting a subscription requires an access token to call the subscription API. 28. For the POST URL, enter `https://login.microsoftonline.com/"insert tenant id here"/oauth2/token`. 29. For POST raw body of the request, enter `grant_type=client_credentials&client_id="insert client id here"&client_secret="insert secret key here"&resource=https://manage.office.com` 30. In the header, set **Key** to 'Content-Type' and the value to 'application/x-www-form-urlencoded' **d** Send the post results in JSON and retrieve the access token from the response to use in the next request. ### Note For information about access tokens, see https://docs.microsoft.com/en-us/office/office-365-management-api/ get-started-with-office-365-management-apis#request-access-tokens-from-azure-ad. 31. Start subscriptions. 32. For the POST URL, enter https://manage.office.com/api/v1.0/"insert tenant id here"/activity/feed/ subscriptions/start?contentType="insert desired subscription content type" 33. In the header, set **Key** to 'Authorization' and the value 'bearer "insert accesss token here"' JSON indicates that the content type is enabled. ### Note As of June 12, 2017, content types are Audit.AzureActiveDirectory, Audit.Exchange, Audit.SharePoint, Audit.General, and DLP.All. For information about starting subscriptions, see https://docs.microsoft.com/en-us/office/office-365-management-api/ office-365-management-activity-api-reference#start-a-subscription. 34. Verify which content types are subscribed. 35. For the GET URL, enter https://manage.office.com/api/v1.0/"insert tenant id here"/activity/feed/ subscriptions/list 36. In the header, set **Key** to 'Authorization' and the value to 'bearer "insert accesss token here"' JSON returns with a list of all content types that are enabled. ### Note For information about listings subscriptions, see https://docs.microsoft.com/en-us/office/office-365-management-api/ office-365-management-activity-api-reference#list-current-subscriptions. :