Register Grok Bot in Microsoft Entra ID
Register Grok Bot as an app in Microsoft Entra ID so it can sign people in to your Dtwo gateway.
On this page
Overview
Grok Bot 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 Grok Bot 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 Grok Bot
- Go to App registrations → New registration, name it after the client (for example
Grok Bot), set Supported account types to Single Tenant Only — Default Directory, and select Register. - From Overview, copy the Application (client) ID — this is the client’s
<ClientId>. - Under Authentication → Add a platform, select Web and add the redirect URI
https://www.cursor.com/agents/mcp/oauth/callback. Grok Bot signs people in from Cursor’s servers, so it uses a web redirect rather than a localhost one. - 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, everyone has to update it in Grok Bot. - Under API permissions → Add a permission, open the APIs my organization uses tab, search for
<ApplicationId>, select your gateway application, check themcpscope, and select Add permissions.
Next steps
Use the client ID and secret you copied to roll out Dtwo to your organization in Grok Bot or to connect Grok Bot for yourself.