Azure OpenAI Responses API drops MCP Authorization header in background mode

Juan Sebastian Palomino Boshell 10 Puntos de reputación
2026-09-15T20:53:40.0333333+00:00

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?

  1. 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
    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

   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 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

  1. Is authenticated remote MCP officially supported with background: true and store: true?
  2. Should tools[].headers.Authorization be persisted and forwarded when background processing resumes?
  3. Is this a known limitation or service issue?
  4. Is another request property required to preserve MCP authentication during background execution?
  5. Is there a recommended workaround other than executing the Responses API request synchronously?
Azure OpenAI en Modelos de Fundición
0 comentarios No hay comentarios

Su respuesta

Las respuestas pueden ser marcadas como Respuestas aceptadas por el autor de la pregunta, lo que indica a los usuarios que la respuesta resolvió su problema.