How-To Guide

Configuring 365 to Forward Logs to EventTracker

EventTracker v9.x and above

Publication Date:

April 26, 2021

© Copyright Netsurion. All Rights Reserved. 1

Abstract

This guide provides instructions to configure to generate logs for critical events. Once EventTracker is configured to collect and parse logs, then dashboard and reports can be configured to monitor Microsoft 365 usage. Scope

The configuration details in this guide are consistent with EventTracker version 9.x and later and Microsoft 365. Audience

IT Admins, Microsoft 365 administrators and EventTracker users who want to forward logs to EventTracker Manager and monitor events using EventTracker.

© Copyright Netsurion. All Rights Reserved 2

Table of Contents

Table of Contents ...... 3 1. Overview ...... 4 2. Prerequisites ...... 4 3. Configuring Microsoft 365 to forward logs to EventTracker...... 4 3.1 Creating User and Application with Microsoft 365 Integrator ...... 4 3.2 Creating User and Application without Microsoft 365 Integrator ...... 8 3.2.1 Assigning Compliance Management Permission to a Microsoft 365 User ...... 10 3.2.2 Registering Application with your Azure Active Directory Tenant...... 13 4. Verifying Microsoft 365 Integration ...... 20 5. Microsoft 365 Error ...... 20 About Netsurion ...... 23

© Copyright Netsurion. All Rights Reserved 3

1. Overview EventTracker knowledge pack for Microsoft 365 captures important activities in Exchange and Azure Active Directory. Monitoring these activities is critical from a security aspect and is required for compliance and operational reasons. The dashboards, reports help in getting insights to analyze various security use cases like login activities from different countries, changes in user permission, spam and malicious email detection and mailbox auditing. EventTracker detects and alerts a spoofed email from the received emails.

EventTracker helps you to monitor day to day activities of Microsoft 365 Exchange like mailbox storage usage and summary of mail traffic.

2. Prerequisites • EventTracker v9.x or above should be installed.

• PowerShell 5.0 should be installed on the EventTracker Manager.

• Microsoft 365 service account should have Report Reader Role and Compliance Management permission. Click here for instructions.

• Ensure Auditing is enabled on your Tenant. Click here for Instructions.

• The app should be registered in Azure AD with Office 365 Management API and Microsoft graph API permission. Click here for Instructions.

• Enable the following URL, if there is any web filter or firewall in between:

o https://graph.microsoft.com o https://login.windows.net o https://manage.Microsoft.com • At present for Microsoft 365 GCC, GCC High and Dod customer, we do not have message trace monitoring support. • As Microsoft keep updating Event types. Click here for all event type details.

3. Configuring Microsoft 365 to forward logs to EventTracker 3.1 Creating User and Application with Microsoft 365 Integrator Follow these steps to create user and application with Microsoft 365 integrator:

1. Download the Microsoft365Integrator.exe on a system having EventTracker agent. 2. Save Microsoft365Integrator.exe and run the executable file Microsoft365Integrator.exe. (After launching an integrator, it checks for PowerShell compatibility. If found compatible, the integrator allows you to configure Microsoft 365. Otherwise, update PowerShell on the machine.)

© Copyright Netsurion. All Rights Reserved 4

Note: You can create a user with Compliance Management and Report Reader permission through an integrator as well.

3. Click Create User and Application for Integration provide the appropriate Username/password and click Create. 4. Click Create to provide global administrator credentials for creating a user.

© Copyright Netsurion. All Rights Reserved 5

5. Install AzureAD modules of PowerShell, for creating user. Integrator tries to install this module. If this module fails to install, then create user and application manually. If you have GCC or DoD 365 subscription, do not create User as at present, we do not have support for it. 6. Click Create Application to create Microsoft graph and Office 365 Management APIs, enable the app in Azure AD and then click OK. If you want to create a Microsoft Graph app manually, follow the step mentioned here.

7. Launch the browser for granting the permission for the application. Login with global admin credential and click Accept.

© Copyright Netsurion. All Rights Reserved 6

8. Accept the permission, close the browser tab, and go back to Integrator. 9. Click Validate to review user and application configuration.

© Copyright Netsurion. All Rights Reserved 7

10. Click Save. It will check the subscription, fetch organization details, and save the configuration. Microsoft Office 365 is integrated with EventTracker successfully. Check the logs in EventTracker manager console.

3.2 Creating User and Application without Microsoft 365 Integrator Follow these steps to create User and application without integrator. If the above steps are followed, then you may ignore the following steps.

1. Contact EventTracker Support for Microsoft 365 Integration package. 2. Save Microsoft365Integrator.exe and run the executable file Microsoft365Integrator.exe. (After launching the integrator, it checks for PowerShell compatibility. If it is found compatible, the integrator allows you to configure Microsoft 365. Otherwise, update PowerShell on the EventTracker Manager machine.)

© Copyright Netsurion. All Rights Reserved 8

3. Follow the Registering Application section, Assigning Compliance Management permission sections for application and user creation, respectively. Fill the details of User details and Application details.

4. Fill Microsoft 365 service account details having Compliance Management permission. Service account with administrative access is not required to fetch the logs and a normal service account with “Compliance Management” permission would suffice. For creating a service account with Compliance Management permissions, follow the instructions mentioned here. 5. Fill the details of the app registered in Azure AD with Microsoft graph and Microsoft 365 Management API permission. If the user does not have an app registered in Azure AD, follow the instructions mentioned here. 6. Provide the tenant ID for the enterprise. Follow the instruction mentioned here, if tenant ID is not known.

© Copyright Netsurion. All Rights Reserved 9

7. Fill EventTracker Manager textbox with EventTracker manager system IP or hostname. Provide EventTracker Group details where Microsoft 365 system should be placed. 8. After all details are provided in the Integrator validate button is enabled. Click Validate to verify the details provided. If the credential is proper, then the Save button is enabled or it will throw error. View the details of the error here 9. Click Save to complete the Integration.

3.2.1 Assigning Compliance Management Permission to a Microsoft 365 User For creating Microsoft 365 service account with Reports Reader and Compliance Management role permission, follow the below procedure. This procedure should be carried out by a user having Administrator rights in Microsoft 365.

1. Create the user (e.g., [email protected]) with the Reports Reader role. Follow the instructions here. 2. Click here to go to the Microsoft 365 admin center. 3. Go to the Microsoft 365 admin center by selecting the app launcher icon Microsoft 365 app launcher in the upper-left and choose Admin.

4. On the left, select Admin Centers and select Exchange.

© Copyright Netsurion. All Rights Reserved 10

5. On the left pane, select Permissions.

© Copyright Netsurion. All Rights Reserved 11

6. On the right pane, click Compliance Management and click on icon.

7. Scroll to Members and Click icon.

8. Select the User-Name (e.g., [email protected]) and click Ok.

© Copyright Netsurion. All Rights Reserved 12

9. Save the changes.

3.2.2 Registering Application with your Azure Active Directory Tenant If the application is not registered in Azure AD, follow the below procedure. This procedure should be carried out by a user having Global Administrator rights in Microsoft 365.

1. Sign in to the Azure portal. 2. If your account gives you access to more than one, click your account in the top right corner, and set your portal session to the desired Azure AD tenant. 3. In the left-hand navigation pane, click the Azure Active Directory service, click App registrations, and click New registration.

© Copyright Netsurion. All Rights Reserved 13

4. When the Create page appears, enter your application's registration information. • Name: Enter an appropriate application name (e.g., ETSIEMConnector). • Supported account types: Select Accounts in this organizational directory only. • Redirect URI: Select Web and Enter http://localhost.

© Copyright Netsurion. All Rights Reserved 14

© Copyright Netsurion. All Rights Reserved 15

5. Click Register. Azure AD assigns a unique Application ID to your application, and you are taken to the application's main registration page. Note the Application ID. 6. To add permission(s) to access resource APIs from your client, • Click the API Permissions section -> Add a Permission. • Click the Microsoft API tab to select the type of resources you need and select the Microsoft Graph.

7. After selecting the Microsoft Graph, add following application permissions. • Read your organization’s security events.

© Copyright Netsurion. All Rights Reserved 16

• Read all usage reports. • Read all audit log data.

8. We need to select Office 365 Management API in the required permissions and select all application permission.

© Copyright Netsurion. All Rights Reserved 17

9. Click Grant admin consent after selecting permission. For granting permissions, the user(s) with Global Administrator privileges are required.

© Copyright Netsurion. All Rights Reserved 18

10. The application's main registration page display, to add a secret key for your web application's credentials. • Click the Certificates & secrets section on the Settings page. • Add a description for your key (e.g., ETKey). • Select Never from the expires section. • Click Add. The right-most column contains the key value after you save the configuration. Note the value generated, this is used in integrator as client secret.

Figure 24 Note the Application ID and Tenant ID after completing app configuration.

© Copyright Netsurion. All Rights Reserved 19

4. Verifying Microsoft 365 Integration After providing details in Microsoft 365 Integrator, follow the steps to verify the Microsoft 365 integration.

• Check if the following services are created in the machine and are running.

• Check the following schedule task.

5. Microsoft 365 Error Following are the error table for Microsoft 365.

Code Message Troubleshooting AF10001 The permission set ({0}) sent in the request did not include the expected permission ActivityFeed.Read. Check the permission on {0} = the permission set in the access token. application registered AF20001 Missing parameter: {0}. Contact the EventTracker {0} = the name of the missing parameter. support team AF20002 Invalid parameter type: {0}. Expected type: {1} {0} = the name of the invalid parameter. Contact the EventTracker {1} = the expected type (int, datetime, guide). support team AF20003 Expiration {0} provided is set to past date and time. Contact the EventTracker {0} = the expiration passed in the API call. support team AF20010 The tenant ID passed in the URL ({0}) does not match the tenant ID passed in the access token ({1}).

{0} = tenant ID passed in the URL Check the tenant Id provided {1} = tenant ID passed in the access token in Microsoft 365 form AF20011 Specified tenant ID ({0}) does not exist in the system or has Contact the Microsoft Support been deleted. for troubleshooting the issue

© Copyright Netsurion. All Rights Reserved 20

Code Message Troubleshooting {0} = tenant ID passed in the URL AF20012 Specified tenant ID ({0}) is incorrectly configured in the system. Contact the Microsoft support {0} = tenant ID passed in the URL for troubleshooting the issue AF20013 The tenant ID passed in the URL ({0}) is not a valid GUID.

Check the tenant Id provided {0} = tenant ID passed in the URL in Microsoft 365 form AF20020 The specified content type is not valid. Contact the EventTracker support team AF20021 The webhook endpoint {{0}) could not be validated. {1}

{0} = webhook address. {1} = "The endpoint did not return HTTP 200." or "The Contact the EventTracker address must begin with HTTPS." support team AF20022 No subscription found for the specified content type.

AF20023 The subscription was disabled by {0}. Contact the Microsoft support {0} = "a tenant admin" or "a service admin" for troubleshooting the issue AF20030 Start time and end time must both be specified (or both omitted) and must be less than or equal to 24 hours apart, with the start time no more than 7 days in the past. Contact the EventTracker support team AF20031 Invalid nextPage Input: {0}. Contact the EventTracker {0} = the next page indicator passed in the URL support team AF20050 The specified content ({0}) does not exist. Contact the EventTracker {0} = resource id or resource URL support team AF20051 Content requested with the key {0} has already expired. Content older than 7 days cannot be retrieved.

Contact the EventTracker • {0} = resource id or resource URL support team AF20052 Content ID {0} in the URL is invalid. Contact the EventTracker {0} = resource id or resource URL support team AF20053 Only one language may be present in the Accept-Language Contact the EventTracker header. support team AF20054 Invalid syntax in Accept-Language header. AF429 Too many requests. Method={0}, PublisherId={1} Contact the EventTracker {0} = HTTP Method support team

© Copyright Netsurion. All Rights Reserved 21

Code Message Troubleshooting {1} = Tenant GUID used as PublisherIdentifier AF50000 An internal error occurred. Retry the request. Contact the EventTracker support team

© Copyright Netsurion. All Rights Reserved 22

About Netsurion Flexibility and security within the IT environment are two of the most important factors driving business today. Netsurion’s cybersecurity platforms enable companies to deliver on both. Netsurion’s approach of combining purpose-built technology and an ISO-certified security operations center gives customers the ultimate flexibility to adapt and grow, all while maintaining a secure environment. Netsurion’s EventTracker cyber threat protection platform provides SIEM, endpoint protection, vulnerability scanning, intrusion detection and more; all delivered as a managed or co-managed service. Netsurion’s BranchSDO delivers purpose-built technology with optional levels of managed services to multi- location businesses that optimize network security, agility, resilience, and compliance for branch locations. Whether you need technology with a guiding hand or a complete outsourcing solution, Netsurion has the model to help drive your business forward. To learn more visit netsurion.com or follow us on Twitter or LinkedIn. Netsurion is #19 among MSSP Alert’s 2020 Top 250 MSSPs.

Contact Us Corporate Headquarters Netsurion Trade Centre South 100 W. Cypress Creek Rd Suite 530 Fort Lauderdale, FL 33309

Contact Numbers EventTracker Enterprise SOC: 877-333-1433 (Option 2) EventTracker Enterprise for MSP’s SOC: 877-333-1433 (Option 3) EventTracker Essentials SOC: 877-333-1433 (Option 4) EventTracker Software Support: 877-333-1433 (Option 5) https://www.netsurion.com/eventtracker-support

© Copyright Netsurion. All Rights Reserved 23