---
title: "Outlook Calendar"
canonical_url: "https://docs.getdx.com/connectors/outlook-calendar/"
md_url: "https://docs.getdx.com/connectors/outlook-calendar.md"
last_updated: "2026-06-08"
---

# Outlook Calendar
By integrating Outlook Calendar with DX, you can measure time spent in meetings to analyze and improve developer focus time.

- DX imports historical events from Outlook Calendar, only for DX contributors.
- When an Outlook calendar is private (i.e., marked as "Not shared" to be viewed by other organization members), DX will not import its events.

To ensure accuracy in what is categorized as a meeting, DX excludes events with duration of less than 15 minutes or more than 4 hours, as well as events with only a single attendee.

## Prerequisites

To connect Outlook Calendar to DX, you need:

- Access to Microsoft Entra dashboard
- Be able to create a Microsoft Entra application and grant consent to the application for the tenant

## Setup instructions

Follow the steps below to connect Outlook calendar to DX.

#### Step 1 - Register a new app

1. Go to the [Microsoft Entra dashboard](https://entra.microsoft.com/#home).
2. Got to App registrations > New registration
   ![](https://docs.getdx.com/assets/images/connectors/outlook-calendar/outlook-app-registration.png){class="max-w-lg mx-auto"}
3. You can choose between the first two options based on the account type
4. Leave "Redirect URI" as blank and click on Register

#### Step 2 - Grant API permissions to the application

1. Go to the API permissions > Add a permission.
2. Click on Microsoft Graph > Application permissions.
3. Search for `Calendars.ReadBasic.All` permission, select it and click on "Add permission".
   ![](https://docs.getdx.com/assets/images/connectors/outlook-calendar/outlook-api-permissions-select.png){class="max-w-lg mx-auto"}
4. Click on "Grant admin consent for [Your Organization]" (The status should be "Granted for [Your Organization]").
   ![](https://docs.getdx.com/assets/images/connectors/outlook-calendar/outlook-api-grant-permission.png){class="max-w-lg mx-auto"}

#### Step 3 - Generate client secret

1. Go to the Certificates & secrets.
2. Click on New client secret.
3. Type in appropriate description and expiration time.
4. Click on "Add" and copy the secret value
   ![](https://docs.getdx.com/assets/images/connectors/outlook-calendar/outlook-app-secrets.png){class="max-w-lg mx-auto"}

#### Step 4 - Copy client ID and tenant ID

Copy Application (client) ID and Directory (tenant) ID from the App overview page.
![](https://docs.getdx.com/assets/images/connectors/outlook-calendar/outlook-new-application.png){class="max-w-lg mx-auto"}

#### Step 5 — Restrict org-wide access using Microsoft Graph RBAC (Optional)

By default, granting `Calendars.ReadBasic.All` to an app gives it **organization-wide access**.  
To scope this down, you can restrict access to only certain users or groups via **Microsoft Entra RBAC** using **Application Access Policies**.

##### Enable RBAC restriction

1. **Create a mail-enabled security group**
   - In Microsoft Entra Admin Center, create a **mail-enabled security group**.
   - Add the subset of users whose calendars the connector should access.

2. **Create an Application Access Policy**
   - Connect to Exchange Online PowerShell:
     ```powershell
     Connect-ExchangeOnline -UserPrincipalName <admin@yourtenant.com>
     ```
   - Create the policy to scope access:
     ```powershell
     New-ApplicationAccessPolicy `
       -AppId "<client-id-of-your-app>" `
       -PolicyScopeGroupId "<mail-enabled-security-group-id>" `
       -AccessRight RestrictAccess `
       -Description "Restrict Outlook Calendar access to members of this group"
     ```

3. **Validate the policy**  
   Run the following to check access:
   ```powershell
   Test-ApplicationAccessPolicy `
     -AppId "<client-id-of-your-app>" `
     -Identity "<user@domain.com>"
   ```

#### Step 6- Finish setup

- Navigate to the connections page in DX and select "+ Connection" in the top right.
- Enter the credentials you have generated in the previous steps—refer to the information below for errors and troubleshooting.

## API reference

The table below lists the specific API endpoints that are used by DX.


| Endpoint | Documentation |
|----------------------------------------------------|---------------|
| /users/{userEmail}/calendar/calendarView | [Link](https://learn.microsoft.com/en-us/graph/api/user-list-calendarview?view=graph-rest-1.0&tabs=http) |
| /users/{userEmail}/calendar/calendarPermissions | [Link](https://learn.microsoft.com/en-us/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0&tabs=http) |
| /oauth2/v2.0/token | [Link](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow) |


## Errors

The table below lists potential error codes when adding a connection in DX.


| Error | Description |
|----------------------|------------------------------------------------------------------------------------------------------------------|
| `invalid_credentials` | Your API credentials entered are not valid. |
| `invalid_permissions` | Your API token does not have the permissions required by DX. |
---

## Sitemap

[Overview of all docs pages](/llms.txt)
