AlienApp for Office 365 Requirements

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.

Firewall Permissions for the USM Anywhere 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

  1. In USM Anywhere, go to Data Sources > AlienApps.
  2. Click the Available Apps tab.
  3. Enter Office 365 in the Search field, and then click the tile.
  4. Click the Instructions tab.

    The page contains a manifest for the AlienApp and an abbreviated version of the following procedure.

  5. Save the content of the value field within the manifest in a file named cert.pem.

To register USM Anywhere in Azure

  1. Save the content of your value field in a file named cert.pem. Do not include quotation marks:

  2. Log in to the Azure portal and click Azure Active Directory.
  3. Go to App Registrations, and then click New Registration.

    Add a new app registration in the Azure console

  4. Register the application:

    1. Enter a name for the application.
    2. 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.

    3. In Redirect URI, enter your USM Anywhere login URL (for example, https://acmecompany.alienvault.cloud).

      Define a new Web app/API application for your Office 365 environment

    4. Click Register.

      The application is created and the overview page displays.

  5. Add permissions for accessing Office 365 Management APIs:

    1. Go to API Permissions, and then click Add a Permission.
    2. Under Request API Permissions, click Office 365 Management APIs.
    3. Click Application Permissions.
    4. Expand the groups to select ActivityFeed.Read permissions, and then click Add Permissions.
    5. Office 365 Add permissions

  6. Add permissions for pulling Azure AD users:

    1. Go to API Permissions, and then click Add a Permission.
    2. Under Request API Permissions, click Microsoft Graph.
    3. Click Application Permissions.
    4. Expand User to select User.Read.All and Users.EnableDisableAccount.All permissions, and then click Add Permissions.

      add permissions

    5. 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.

      Office 365 Configured permissions

  7. Update the credentials of the application:

    1. Go to Certificates & Secrets.

      Select the Office 365 API app you created

    2. Select the cert.pem file created in the previous procedure, and then click Add.

      The credentials of the application are updated.

  8. Return to the overview page of the application and copy the Application (Client) ID and Directory (Tenant) ID to your clipboard.

    application ID and tenant ID

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,UpdateInboxRules