Skip to content

Commit ae7b139

Browse files
committed
Clarify instructions for OAuth identity passthrough and enhance security recommendations for MCP server connections
1 parent 67b72ef commit ae7b139

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

articles/azure-functions/functions-mcp-foundry-tools.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The credentials that your agent needs to connect to the MCP server depend on the
7070
When you use an access key to connect to your MCP server endpoint, you use a shared secret key to make it more difficult for random agents to connect to your server.
7171

7272
>[!IMPORTANT]
73-
>While access keys can mitigate unwanted endpoint access, consider using Microsoft Entra ID authentication to secure your MCP server endpoints in production.
73+
>While access keys can help prevent unwanted endpoint access, consider using Microsoft Entra ID authentication to secure your MCP server endpoints in production.
7474
7575
The name of the access key you need depends on your MCP server deployment:
7676

@@ -139,8 +139,7 @@ For a Functions-hosted MCP server with built-in authentication, use custom OAuth
139139

140140
1. (Optional) Select **Manage** > **Expose an API** and create or copy an existing scope.
141141

142-
>[!IMPORTANT]
143-
>After you configure OAuth identity passthrough in the Foundry portal, you receive a redirect URL. You must add this redirect URL to your Microsoft Entra app registration under **Manage** > **Authentication** > **Platform configurations**.
142+
After you configure OAuth identity passthrough in the Foundry portal, you receive a redirect URL. You must return to this Entra app registration to add this redirect URL to your Microsoft Entra app registration.
144143

145144
### [Unauthenticated](#tab/unauthenticated)
146145

@@ -195,7 +194,7 @@ The process for creating the agent connection to the MCP server depends on your
195194

196195
### [Key-based](#tab/key-based)
197196

198-
When you use key-based authentication, the agent authenticates with your MCP server by passing a function access key in the request header.
197+
When you use key-based authentication, the agent authenticates by passing a function access key in the request header to your MCP server.
199198

200199
To connect to your MCP server endpoint:
201200

@@ -211,7 +210,7 @@ To connect to your MCP server endpoint:
211210

212211
| Field | Description | Example |
213212
| ----- | ----------- | ------- |
214-
| **Name** | A unique identifier for your MCP server. You can use your function app name as the default. | `contoso-mcp-tools` |
213+
| **Name** | A unique identifier for your MCP server. Use your function app name as the default. | `contoso-mcp-tools` |
215214
| **Remote MCP Server endpoint** | The URL endpoint for your MCP server. | `https://contoso-mcp-tools.azurewebsites.net/runtime/webhooks/mcp` |
216215
| **Authentication** | The authentication method to use. | `Key-based` |
217216
| **Credential** | The key-value pair to authenticate with your function app. | `x-functions-key`: `aaaaaaaa-0b0b-1c1c-2d2d-333333333333` |
@@ -274,11 +273,15 @@ When you use OAuth identity passthrough, the agent prompts the user to sign in a
274273
| **Scopes** | The specific permissions or resource access levels your server app requests from the authorization server | `api://00001111-aaaa-2222-bbbb-3333cccc4444` |
275274

276275
>[!NOTE]
277-
>A **Client secret** value isn't needed, so you should leave this field blank.
276+
>A **Client secret** value isn't needed, so leave this field blank.
278277
279-
1. Select **Connect** to create a connection to your MCP server endpoint. You should now see your server name listed under **Tools**.
278+
1. Select **Connect** to create a connection to your MCP server endpoint.
280279

281-
1. Select **Save** to save the MCP tool configuration in your agent.
280+
1. After you create your credential provider, you receive a **Redirect URL**. Before you **Close** this window, make sure to copy the URL value. You must add this redirect URL to your Entra app registration.
281+
282+
1. Return to your Entra app registration and under **Manage** > **Authentication** select **+ Add redirect URI**. Select **Web**, paste the copied **Redirect URI** value, and select **Configure**.
283+
284+
1. Go back to the agent window, select **Close** > **Save** to save the MCP tool configuration in your agent.
282285

283286
### [Unauthenticated](#tab/unauthenticated)
284287

@@ -314,6 +317,7 @@ After connecting your MCP server to your agent, verify that the tools work corre
314317

315318
1. In the Agent Builder, find the chat window under **Playground**.
316319
1. Enter a prompt that should trigger one of your MCP tools. For example, if your MCP server has a greeting tool, try: `Use the greeting tool to say hello`.
320+
1. If you're using OAuth identity passthrough, select **Open Consent** and sign in with your Entra account.
317321
1. When the agent requests to invoke an MCP tool, review the tool name and arguments, and select **Approve** to allow the call.
318322
1. Verify the tool returns the expected result.
319323

0 commit comments

Comments
 (0)