Servicio de Azure que proporciona acceso a los modelos de GPT-3 de OpenAI con funcionalidad para empresas.
Azure OpenAI Responses API drops MCP Authorization header in background mode
I am experiencing an authentication-header propagation issue when using an authenticated remote MCP server with the Azure OpenAI Responses API.
Configuration
API: Azure OpenAI Responses API
Endpoint format: https://<resource-name>.openai.azure.com/openai/v1
MCP transport: Streamable HTTP
Background execution: enabled
Response storage: enabled
Sanitized request:
{
"model": "<deployment-name>",
"input": "<test input>",
"background": true,
"store": true,
"tools": [
{
"type": "mcp",
"server_label": "test_mcp",
"server_url": "https://<mcp-host>/mcp",
"headers": {
"Authorization": "Bearer <redacted>"
},
"require_approval": "never"
}
]
}
Expected behavior
Azure OpenAI should forward the Authorization header defined in tools[].headers to every request made to the remote MCP server, including requests executed asynchronously while processing a stored background response.
Actual behavior
Azure OpenAI accepts the initial Responses API request.
The submitted MCP tool contains headers.Authorization.
During background processing, Azure OpenAI calls POST /mcp without the Authorization header.
The MCP server correctly returns HTTP 401 because the header is missing.
The response eventually reaches a terminal failed state with tool_user_error or http_error.
MCP ingress telemetry reports:
method: POST
path: /mcp
authorizationHeaderPresent: false
credentialSource: None
result: 401
failureKind: MissingAuthorizationHeader
Control tests
The equivalent request works when using:
{
"background": false
}
In synchronous mode:
The MCP server receives the Authorization header.
The same bearer token is accepted.
MCP initialization and tool calls complete successfully.
The Responses API request completes successfully.
The MCP endpoint also accepts direct requests using the same token. The background failures occur while the token is still valid, so this does not appear to be caused by token expiration.
Questions
Is authenticated remote MCP officially supported with background: true and store: true?
Should tools[].headers.Authorization be persisted and forwarded when background processing resumes?
Is this a known limitation or service issue?
Is another request property required to preserve MCP authentication during background execution?
- Is there a recommended workaround other than executing the Responses API request synchronously?I am experiencing an authentication-header propagation issue when using an authenticated remote MCP server with the Azure OpenAI Responses API.
Configuration
- API: Azure OpenAI Responses API
- Endpoint format:
https://<resource-name>.openai.azure.com/openai/v1 - MCP transport: Streamable HTTP
- Background execution: enabled
- Response storage: enabled
{
"model": "<deployment-name>", "input": "<test input>", "background": true, "store": true, "tools": [ { "type": "mcp", "server_label": "test_mcp", "server_url": "https://<mcp-host>/mcp", "headers": { "Authorization": "Bearer <redacted>" }, "require_approval": "never" } ] }
## Expected behavior
Azure OpenAI should forward the `Authorization` header defined in `tools[].headers` to every request made to the remote MCP server, including requests executed asynchronously while processing a stored background response.
## Actual behavior
1. Azure OpenAI accepts the initial Responses API request.
1. The submitted MCP tool contains `headers.Authorization`.
1. During background processing, Azure OpenAI calls `POST /mcp` without the `Authorization` header.
1. The MCP server correctly returns HTTP 401 because the header is missing.
1. The response eventually reaches a terminal `failed` state with `tool_user_error` or `http_error`.
MCP ingress telemetry reports:
```yaml
method: POST
path: /mcp
authorizationHeaderPresent: false
credentialSource: None
result: 401
failureKind: MissingAuthorizationHeader
Control tests
The equivalent request works when using:
{
"background": false
}
In synchronous mode:
- The MCP server receives the
Authorizationheader. - The same bearer token is accepted.
- MCP initialization and tool calls complete successfully.
- The Responses API request completes successfully.
The MCP endpoint also accepts direct requests using the same token. The background failures occur while the token is still valid, so this does not appear to be caused by token expiration.
Questions
- Is authenticated remote MCP officially supported with
background: trueandstore: true? - Should
tools[].headers.Authorizationbe persisted and forwarded when background processing resumes? - Is this a known limitation or service issue?
- Is another request property required to preserve MCP authentication during background execution?
- Is there a recommended workaround other than executing the Responses API request synchronously?