Office 365 Configuration Guide
Guide to deploying the Datadog Office365 integration from the Datadog marketplace

Overview

The Microsoft Office 365 integration monitors product activity, usage and licensing of Exchange, Outlook, Sharepoint, OneDrive, Yammer, Teams, and Skype. The integration also runs synthetic operations in Outlook, Teams, and OneDrive to provide application performance monitoring from multiple locations worldwide. The Office 365 integration comes with a dashboard that allows you to filter based on User, OneDrive, Sharepoint URL, and more. It also uses Datadog Synthetic checks to validate that the Office 365 URLs are online and responding in an acceptable timeframe.
All integrations can be toggled on and off in the o365.yaml file as part of the integration. Its recommended to disable any products you dont want to monitor to avoid usage of additional metrics.

Setup

Datadog Integration Install

Install the Office365 Integration. Obtain the command to download the agent by activating the free trial in the Marketplace.

Microsoft Office 365 Configuration

The Microsoft Office 365 integration requires permissions managed through your organization's Azure Active Directory as well as a dedicated "integration user account" to perform synthetic operations.
  1. 1.
    Create a new Office 365 user account. The integration user account should not be shared with an active user in your organization. Retain the user account username (email) and password for use in the datadog agent configuration step.
  2. 2.
    Add the username and password parameters to the o365.d/o365.yaml configuration file. username should be the email address (UPN) of the Office 365 user created in step 1.
  3. 3.
    3.1. Create a New Registration. Select a name that will clearly distinguish the application registration, e.g. DatadogIntegration.
    3.2. Configure the DatadogIntegration application API permissions.
    • Select Add a permission, Microsoft Graph, and then Application Permissions. Add the following permissions:
      • Reports.Read.All
    • Select Add a permission, Office 365 Management APIs, and then Application Permissions. Add the following permissions:
      • ActivityFeed.Read
      • ActivityFeed.ReadDlp
      • ServiceHealth.Read
    • Select Add a permission, Microsoft Graph, and then Delegated Permissions. Add the following permissions:
      • Calendars.ReadWrite
      • Channel.Create
      • ChannelMessage.Send
      • Directory.ReadWrite.All
      • email
      • Files.ReadWrite
      • Group.ReadWrite.All
      • offline_access
      • openid
      • profile
      • Reports.Read.All
      • Team.ReadBasic.All
    • Select Grant Admin Consent for {Organization} to give consent to the app registration to consume the configured API permissions.
      3.3. From the app registration Overview, add the Application (client) ID and Directory (tenant) ID values to the o365.d/o365.yaml file as client_id and tenant_id, respectively.
      3.4. Select Certificates & secrets and New client secret. It's recommended to use Never for expiration unless you are actively managing the secret for your agent installation. Copy the client secret value promptly from the Microsoft Azure UI as the secret will be masked after a short period of time.
      3.5. Add the generated client_secret value to the o365.d/o365.yaml file.
  4. 4.
    Create a Microsoft Teams group and channel for the integration Teams synthetic checks.
    4.1. The Group/Teams name must be dd-agent-synthetic. The integration specifically looks for a Group/Teams called dd-agent-synthetic.
    4.2. Add the integration user created in step 1 to the Microsoft Teams dd-agent-synthetic. The synthetic check will use the default General channel to send and reply to messages.
  5. 5.
    Configure the integration user account mailbox to auto-forward emails to [email protected]. Optionally set your email forwarding configuration to disable copies of forwarded email.
  6. 6.
    Modify the OneDrive storage configuration for the integration user account. Specify minimum of thirty (30) days and 1024 GB to prevent the integration user synthetic files from consuming all allocated storage. The default settings, unless modified by your organization, should be thirty (30) days and 1204 GB.
  7. 7.
    The agent's synthetic email check is disabled by default, set enable_email_synthetics: true and set the target email address configured in step 5 by adding email_address: {[email protected]} in the o365.d/o365.yaml.
  8. 8.
    Add SharePoint sites to the o365.d/o365.yaml file to enable collection of SharePoint performance metrics. Ten (10) sites can be added under the configuration section sharepoint_sites. See the configuration example for syntax. The configured username and password for the performance synthetic user is used for the sharepoint login and the SharePoint site(s) must be readable by the configured user.
  9. 9.
    The integration configuration defaults to probe_mode: true, which will operate with application performance synthetics only. For your primary integration location, change probe_mode: false in the configuration yaml to enable report metrics and your tenant's Office 365 incident events.
  10. 10.
    Add the office tag to the integration configuration in o365.d/o365.yaml file to correspond to each office location from which the integration will be running synthetic checks, e.g.:
    1
    tags:
    2
    - "office:boston"
    Copied!

Synthetic Test Configurations

Office 365 Synthetic Test
  1. 1.
    Go to the UX monitoring page of Datadog: https://app.datadoghq.com/synthetics/list
  2. 2.
    Click New Test + on the top right corner of the screen and then click New API Test
  3. 3.
    Under URL input https://office.com/login
  4. 4.
    Under Name input Test on office.com/login
  5. 5.
    Under the Environment section add the tags env:office365 and env:prod
  6. 6.
    Under locations choose the locations that would be most valuable for you. Default locations should be N.California, Mumbai, and Frankfurt (Every location that you choose multiplies the number of API checks being run)
  7. 7.
    Under specify test frequency select 5m but you can increase that to decrease the number of API tests
  8. 8.
    Define assertions: status code is 301
  9. 9.
    Alert is triggered if your test fails for 0 minutes from any 1 of (#) locations
Office 365 SSL Synthetic Test
  1. 1.
    Go to the UX monitoring page of Datadog: https://app.datadoghq.com/synthetics/list
  2. 2.
    Click New Test + on the top right corner of the screen and then click New API Test
  3. 3.
    Change request type to SSL
  4. 4.
    Input the URL www.office.com and ensure the Port number is 443
  5. 5.
    Name the test: Test on www.office.com
  6. 6.
    Add Environment variable: env:office365
  7. 7.
    Under locations choose the locations that would be most valuable for you. Default locations should be N.California, Mumbai, and Frankfurt (Every location that you choose multiplies the number of API checks being run)
  8. 8.
    Under specify test frequency select 5m but you can increase that to decrease the number of API tests
  9. 9.
    Define assertions: Certificate is valid
  10. 10.
    Alert is triggered if your test fails for 0 minutes from any 1 of (#) locations

Validation

Run the Agent's status subcommand and look for o365 under the Checks section.

Support

For support or feature requests please contact RapDev.io through the following channels:
Tiered discounts for Office 365 users over 1,000 are available. Contact us at [email protected].
Made with ❤️ in Boston
This isn't the integration you're looking for? Missing a critical feature for your organization? Drop us a note and we'll build it!!
Last modified 10mo ago