Add entra tutorial#8
Conversation
|
Caution Notebooks or Frontmatter Files Have Been Modified
2 Notebook Files Modified:
0 Frontmatter Files Modified:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive tutorial (Entra_Tutorial.ipynb) on securing the Couchbase MCP Server with Microsoft Entra ID, covering both static token verification and browser-based OAuth flows. The review feedback correctly identifies that Microsoft Entra ID does not support the http:// scheme for Application ID URIs, which would cause validation errors during setup. The reviewer has provided helpful suggestions to switch to the standard api://<SERVER_CLIENT_ID> format and update the corresponding scope configurations throughout the tutorial.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "3. Set it to match your MCP server's resource URL — `http://127.0.0.1:8000/mcp` — then click **Save**.\n", | ||
| "\n", | ||
| "> This must **exactly** match the URL your MCP server will run at, including the `/mcp` path. The server's PRM (Protected Resource Metadata) document advertises this exact value, and Entra requires the Application ID URI to match it.\n", |
There was a problem hiding this comment.
Microsoft Entra ID does not support the http:// scheme for Application ID URIs (Identifier URIs). It only supports https://, api://, urn:, and ms-appx://. Attempting to save http://127.0.0.1:8000/mcp as the Application ID URI in the Entra ID portal will result in a validation error.
Instead, you should use the default api://<SERVER_CLIENT_ID> format, which is the standard and supported way to identify your API in Entra ID. This also simplifies the setup as it is automatically generated by Entra ID.
| "3. Set it to match your MCP server's resource URL — `http://127.0.0.1:8000/mcp` — then click **Save**.\n", | |
| "\n", | |
| "> This must **exactly** match the URL your MCP server will run at, including the `/mcp` path. The server's PRM (Protected Resource Metadata) document advertises this exact value, and Entra requires the Application ID URI to match it.\n", | |
| "3. Click **Save** to accept the default Application ID URI (which is in the format `api://<SERVER_CLIENT_ID>`).\n", | |
| "\n", | |
| "> **Note:** While the MCP server runs at `http://127.0.0.1:8000/mcp`, Entra ID does not allow `http://` schemes for Application ID URIs. Using the default `api://<SERVER_CLIENT_ID>` format is the standard and supported way to identify your API in Entra ID.\n", |
| "curl -X POST https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/devicecode \\\n", | ||
| " -H \"Content-Type: application/x-www-form-urlencoded\" \\\n", | ||
| " -d \"client_id=<CLIENT_APPLICATION_ID>\" \\\n", | ||
| " -d \"scope=http://127.0.0.1:8000/mcp/couchbase-mcp:read http://127.0.0.1:8000/mcp/couchbase-mcp:write\"\n", |
There was a problem hiding this comment.
Since the Application ID URI should be configured as api://<SERVER_CLIENT_ID> instead of http://127.0.0.1:8000/mcp, the scope requested in the device code flow must be updated to use the correct prefix.
| " -d \"scope=http://127.0.0.1:8000/mcp/couchbase-mcp:read http://127.0.0.1:8000/mcp/couchbase-mcp:write\"\n", | |
| " -d \"scope=api://<SERVER_CLIENT_ID>/couchbase-mcp:read api://<SERVER_CLIENT_ID>/couchbase-mcp:write\"\n" |
| "* **Scope:** `http://127.0.0.1:8000/mcp/couchbase-mcp:read http://127.0.0.1:8000/mcp/couchbase-mcp:write`\n", | ||
| "\n", | ||
| "> ⚠️ The scope format must be `<Application ID URI>/<scope-name>` — not just the bare scope name. Since the Application ID URI is `http://127.0.0.1:8000/mcp`, each scope becomes `http://127.0.0.1:8000/mcp/couchbase-mcp:read`.\n", |
There was a problem hiding this comment.
Since the Application ID URI should be configured as api://<SERVER_CLIENT_ID> instead of http://127.0.0.1:8000/mcp, the scope configured in MCP Inspector must be updated to use the correct prefix.
| "* **Scope:** `http://127.0.0.1:8000/mcp/couchbase-mcp:read http://127.0.0.1:8000/mcp/couchbase-mcp:write`\n", | |
| "\n", | |
| "> ⚠️ The scope format must be `<Application ID URI>/<scope-name>` — not just the bare scope name. Since the Application ID URI is `http://127.0.0.1:8000/mcp`, each scope becomes `http://127.0.0.1:8000/mcp/couchbase-mcp:read`.\n", | |
| "* **Scope:** `api://<SERVER_CLIENT_ID>/couchbase-mcp:read api://<SERVER_CLIENT_ID>/couchbase-mcp:write`\n", | |
| "\n", | |
| "> ⚠️ The scope format must be `<Application ID URI>/<scope-name>` — not just the bare scope name. Since the Application ID URI is `api://<SERVER_CLIENT_ID>`, each scope becomes `api://<SERVER_CLIENT_ID>/couchbase-mcp:read`.\n" |
No description provided.