Before you can configure and use the AlienApp for Office 365, you must make sure that your network and your Microsoft Office 365 environment are set up to support the API calls through Microsoft Azure Active Directory (AD) Active Directory (AD) is a database and platform for Windows domain networks that connects users with their network resources. and audit log search.
Firewall Permissions
This integration requires connectivity between your USM Anywhere Sensor and the Microsoft APIs. If you have an Azure Sensor deployed in your Azure subscription, you should use this sensor to configure the AlienApp because you don't need to configure additional permissions.
If you use a non-Azure Sensor, you must set your firewall permissions based on the following table to allow inbound and outbound connections for the sensor.
Type | Port | Endpoint | Purpose |
---|---|---|---|
TCP | 443 | https://login.windows.net | Authentication for your Office 365 account |
TCP | 443 | https://graph.microsoft.com | Queries to retrieve log data from the Microsoft Graph APIs |
TCP | 443 | https://manage.office.com | Queries to retrieve log data from the Office 365 Management APIs |
Note: To access Office 365 US Government, allow connections to graph.microsoft.us instead of graph.microsoft.com and manage.office365.us instead of manage.office.com.
Office 365 Account Privileges
To access Office 365 Management APIs (such as mail, contacts, calendar, and files), you must have an Office 365 Business account with global administrator privileges. See the Microsoft Support article to determine which Office 365 Business products you have.
Note: If you have multiple Office 365 accounts, you must deploy a USM Anywhere Sensor in each Office 365 account from which you want to collect events.
Azure AD Registration
AlienApp for Office 365 configuration includes creating an application in Azure AD. This application securely authenticates the AlienApp for Office 365 so that it can access and collect data according to the services and permission levels you define. This function requires that your Office 365 account is associated with an Azure subscription.
Important: If you do not already have an Azure subscription, you must create one. The subscription is required to register an app in Azure AD for your Office 365 account.
Before registering the application, you must first save a certificate from the AlienApp for Office 365.
To obtain the certificate
- In USM Anywhere, go to Data Sources > AlienApps.
- Click the Available Apps tab.
- Enter Office 365 in the Search field, and then click the tile.
-
Click the Instructions tab.
The page contains a manifest for the AlienApp and an abbreviated version of the following procedure.
- Save the content of the value field within the manifest in a file named cert.pem.
To register USM Anywhere in Azure
- Log in to the Azure portal, and then click Azure Active Directory.
-
Go to App Registrations, and then click New Registration.
-
Register the application:
- Enter a name for the application.
-
In Supported Account Types, select who can use this application.
Your selection decides if this application is single-tenant or multi-tenant in the Microsoft identity platform. See Microsoft Documentation for the description of each type.
-
In Redirect URI, enter your USM Anywhere login URL (for example, https://acmecompany.alienvault.cloud).
-
Click Register.
The application is created and the overview page displays.
-
Add permissions for accessing Office 365 Management APIs:
-
Add permissions for pulling Azure AD users:
- Go to API Permissions, and then click Add a Permission.
- Under Request API Permissions, click Microsoft Graph.
- Click Application Permissions.
-
Expand User to select User.Read.All permissions, and then click Add Permissions.
-
Click Grant Admin Consent for Default Directory, and then click Yes when prompted.
Important: You must grant permissions for the application to work. You must have the global administrator privileges to successfully grant permissions.
-
Update the credentials of the application:
-
Return to the overview page of the application and copy the Application (Client) ID and Directory (Tenant) ID to your clipboard.
Return to USM Anywhere to finish setting up the AlienApp for Office 365. See Configuring the AlienApp for Office 365 for more information.
Audit Log Search
Office 365 audit logging records almost every significant action, including Office 365 logins, viewing documents, downloading documents, sharing documents, setting changes, and password resets. Office 365 includes the Security & Compliance Center to support search capabilities for these logs. You can use the search capabilities to compare events generated by the AlienApp for Office 365 with the information logged in the Office 365 environment.
This feature is required for logs to be collected and is enabled by default as of January 2019. See the Microsoft Support article for more detailed information.
Mailbox Auditing
To collect additional mailbox access activity in your Office 365 environment, you must enable mailbox audit logging. Microsoft mailbox auditing records actions performed by mailbox owners, delegates, and administrators. Mailbox auditing in Office 365 is not mandatory for log collection using the AlienApp for Office 365, but it is turned on by default starting as of January 2019. See the Microsoft Support article for detailed information.
Note: Enabling mailbox auditing requires that you can connect to the Microsoft Exchange Online PowerShell. See Using PowerShell with Exchange Online on the Microsoft site for more information.
It is a best practice to enable global audit logging, including non-owner mailbox access on every mailbox in your tenancy. You can use the following command to enable this auditing:
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox" -or RecipientTypeDetails -eq "SharedMailbox" -or RecipientTypeDetails -eq "RoomMailbox" -or RecipientTypeDetails -eq "DiscoveryMailbox"}| Set-Mailbox -AuditEnabled $true -AuditLogAgeLimit 365 -AuditOwner Create,HardDelete,MailboxLogin,MoveToDeletedItems,SoftDelete,Update,UpdateInboxRule