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
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.
From the Active Directory submenu, click the Properties tab.
Copy the Directory ID value to use as the Tenant ID when setting up Trellix ESM for the Microsoft Office 365 data source.
Navigate to App registrations.
Add an application.
Click New application registration.
Name the application.
Select the Web app/API type.
In Sign-on URL , enter http://localhost:1234.
Click Create at the bottom of the screen.
Select the newly created application.
Copy and save the Application ID to use as the Client ID when setting up Trellix ESM for the Microsoft Office 365 data source.
Enable Trellix ESM to pull event data.
Click Required permissions.
Click Add at the top of the screen.
From Add API Access, click Select an API.
Search for and select Office 365 Management APIs. Then click Select at the bottom of the screen.
In Required Permissions, select Office 365 Management APIs.
Enable all Application Permissions.
Enable all Delegated Permissions then click Save at the top of the screen.
Work with your administrator to grant the application new permissions by clicking Grant Permissions at the top of the screen.
Set up a security key.
Click Keys on the application settings.
Enter a key description and select a duration.
Click Save.
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.
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.
For the POST URL, enter
https://login.microsoftonline.com/"insert tenant id here"/oauth2/token.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.comIn 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.
Start subscriptions.
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"
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.
Verify which content types are subscribed.
For the GET URL, enter https://manage.office.com/api/v1.0/"insert tenant id here"/activity/feed/ subscriptions/list
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.