> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Outlook Calendar with OAuth 2.0 (Client Credentials) – StackOne Hub

> Link a Outlook Calendar account in the StackOne Hub using OAuth 2.0 (Client Credentials). End-user guide to authorize the integration and start using Outlook Calendar actions.

> [!WARNING]
>
> You must have at least Application Developer permissions in Microsoft Entra ID to register an application, and a Privileged Role Administrator or Global Administrator must grant admin consent for application permissions. Application permissions such as Calendars.ReadWrite reach every mailbox in the tenant by default - scope them to named mailboxes with an application access policy, as described in the last section of this guide. Connect this option with webhook events disabled - calendar event subscriptions are created against the signed-in user's own mailbox, which an app-only token does not have. Use the OAuth 2.0 option for webhook events.

Select Actions to adjust the guideSome actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.

Select all
Clear

ActionScope(s)

Loading actions...No actions match your search.

Dynamic Guide URL

Copy URL

Scopes Selected

<pre role="textbox" aria-readonly="true" tabIndex="0" />

Separator

Copy scopes

## Register Your Application in Microsoft Entra ID

Client credentials authentication uses its own app registration that signs in as itself rather than as a user, so register a separate application for it.

**1. Sign in to Microsoft Entra Admin Center**

Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com) as at least an Application Developer.

<ul>
  <li>If you have access to multiple tenants, click the **Settings** (gear) icon in the top-right corner.</li>
  <li>Select the desired tenant from the list under **Directory + subscription**.</li>
</ul>

**2. Create a New App Registration**

Search for **App registrations** in the top search bar, then click **New registration**.

<ul>
  <li>**Name**: A name for your application</li>
  <li>**Supported account types**: select **Accounts in this organizational directory only**</li>
  <li>**Redirect URI**: leave this empty. The client credentials flow never redirects a browser.</li>
  <li>Click **Register**.</li>
</ul>

**3. Copy the Application (Client) ID**

After registration you are taken to the application's **Overview** page. Copy the **Application (client) ID** to **Client ID** in your Connector Profile.

**4. Copy the Directory (Tenant) ID**

From the same **Overview** page, copy the **Directory (tenant) ID** to **Tenant ID** in your Connector Profile.

## Configure Application Permissions

Application permissions are granted to the app itself and are consented once by an administrator. They are a different list from the delegated permissions used by the OAuth 2.0 option.

**1. Add Microsoft Graph Application Permissions**

Enables actions: Accept User Calendar Event, Accept User Event, Cancel User Calendar Event, Cancel User Event, Create Calendar For User, Create Event In User Calendar, Create Event In User Default Calendar, Create User, Create User Calendar Event Attachment, Create User Calendar Group, Create User Calendar Permission, Create User Event Attachment, Decline User Calendar Event, Decline User Event, Delete Event From User Calendar, Delete User, Delete User Calendar, Delete User Calendar Group, Delete User Calendar Permission, Forward User Calendar Event, Forward User Event, Get Event From User Calendar, Get Event From User Default Calendar, Get User, Get User Calendar, Get User Calendar Group, Get User Calendar Permission, Get User Calendar View, List User Calendar Event Attachments, List User Calendar Events, List User Calendar Groups, List User Calendar Permissions, List User Calendars, List User Default Calendar Events, List User Event Attachments, List User Events, List Users, Permanently Delete User Event, Update Event In User Calendar, Update User Calendar, Update User Calendar Group, Update User Calendar Permission

From the left menu under **Manage**, select **API permissions**. Click **Add a permission**, select **Microsoft Graph**, then select **Application permissions** and add the permissions your integration needs.\
\
Add the `User.*` permissions only if you use the user directory actions such as **List Users** or **Create User**. The calendar permissions alone cover every calendar and event action.

<ul>
  <li>Click **Add permissions** to save.</li>
</ul>

<ul>
  <li>
    Calendars.ReadBasic
  </li>

  <li>
    Calendars.Read
  </li>

  <li>
    Calendars.ReadWrite
  </li>

  <li>
    User.ReadBasic.All
  </li>

  <li>
    User.Read.All
  </li>

  <li>
    User.ReadWrite.All
  </li>
</ul>

**2. Grant Admin Consent**

Click **Grant admin consent for \[Your Organization]** and select **Yes**. Application permissions do not work until consent is granted.

<ul>
  <li>Verify that **Granted for \[Your Organization]** appears under the **Status** column for each permission.</li>
</ul>

## Generate Client Secret

The client secret is how the application proves its identity when it requests a token.

**1. Navigate to Certificates & Secrets**

From the left menu under **Manage**, select **Certificates & secrets**.

**2. Create a New Client Secret**

Under the **Client secrets** tab, click **New client secret**.

<ul>
  <li>**Description**: A description that identifies this client secret</li>
  <li>Select an expiration period.</li>
  <li>Click **Add**.</li>
</ul>

**3. Copy the Client Secret Value**

Immediately copy the **Value** of the new client secret to **Client Secret** in your Connector Profile. Azure shows the value only once.

## Limit Which Mailboxes the Application Can Reach

Calendar application permissions apply to every mailbox in the tenant. Exchange Online application access policies restrict an application to the members of a named mail-enabled security group.

**1. Create a mail-enabled security group**

In the [Microsoft 365 admin center](https://admin.microsoft.com), create a mail-enabled security group and add the users whose calendars this connection should reach.

**2. Apply the policy**

Connect to Exchange Online PowerShell and run `New-ApplicationAccessPolicy` with your **Client ID**, the group's address, and `-AccessRight RestrictAccess`. See [Limiting application permissions to specific Exchange Online mailboxes](https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access).

<ul>
  <li>Confirm the result with `Test-ApplicationAccessPolicy`.</li>
  <li>Policy changes can take up to 30 minutes to apply.</li>
</ul>

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Next Steps

> [card] [Webhooks setup](https://docs.stackone.com/connectors/outlookcalendar/guides/webhook-setup.md)
>
> Configure receiving Events for Outlook Calendar into StackOne.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.