Register Claude Code in Microsoft Entra ID

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

On this page
  1. Overview
  2. Before you start
  3. Register Claude Code
  4. Next steps

Overview

Claude Code 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 Claude Code with your gateway 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 first, then come back here.

Register Claude Code

  1. Go to App registrations → New registration, name it after the client (for example Claude Code), 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>.
  3. Under Authentication → Add a platform, select Mobile and desktop applications and add the redirect URI http://localhost:33418/callback.
  4. 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 you copied to roll out Dtwo to your organization in Claude Code or to connect Claude Code for yourself.

Having trouble?

Email us and we'll help you get set up.

Email support
Updated
Get in touch

Tell us what you need to govern.

A few lines is plenty — what you're deploying, and what you need control over. We read every one.

↑↓ to navigate ↵ to open