# Register Microsoft 365 Copilot in Microsoft Entra ID

Register Microsoft 365 Copilot as an app in Microsoft Entra ID so it can sign people in to your Dtwo gateway.

## Overview

Microsoft 365 Copilot needs its own app in Microsoft Entra ID to sign people in to your Dtwo gateway. You only do this once for your organization. Everyone who uses the gateway in Copilot signs in through this app.

## Before you start

If you've already registered your Dtwo gateway in Entra, go to **App registrations**, open the gateway app (for example `Dtwo Gateway`), and copy the **Application (client) ID** from its **Overview** page. This is your `<ApplicationId>`.

If you haven't, follow [Configure Microsoft Entra ID](/docs/identity-provider-entra) first, then come back here.

## Register Microsoft 365 Copilot

1. Go to **App registrations → New registration**, name it after the client (for example `Microsoft 365 Copilot`), set **Supported account types** to **Single Tenant Only — Default Directory**, and select **Register**.
2. From **Overview**, copy the **Application (client) ID** — this is the client's `<ClientId>` — and the **Directory (tenant) ID** — this is your `<TenantId>`.
3. Under **Authentication → Add a platform**, select **Web** and add the redirect URI `https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect`. Microsoft 365 Copilot signs people in from Microsoft's servers, so it uses a web redirect rather than a localhost one.
4. Under **Certificates & secrets → Client secrets**, select **New client secret**, choose an expiry, and select **Add**. Copy the secret's **Value** right away — this is the client's `<ClientSecret>`. Entra only shows it once. When it expires, update it in the Teams Developer Portal.
5. Under **API permissions → Add a permission**, open the **APIs my organization uses** tab, search for `<ApplicationId>`, select your gateway application, check the `mcp` scope, and select **Add permissions**.

## Next steps

Use the client ID, client secret, and tenant ID you copied to [roll out Dtwo to your organization in Microsoft 365 Copilot](/docs/connect-client-m365-copilot).

---

Having trouble? Email [support@dtwo.ai](mailto:support@dtwo.ai).