web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / 406: Not Acceptable: C...
Copilot Studio
Answered

406: Not Acceptable: Client must accept both application/json and text/event-stream

(1) ShareShare
ReportReport
Posted on by Microsoft Employee
I have tried several variations in my OpenAPI 2.0 spec but can't seem to crack this one. Here's my latest attempt:
 
  "paths": {
    "/": {
      "post": {
        "tags": [
          "mcp-http-demoApi"
        ],
        "description": "Adds two numbers.",
        "operationId": "Add",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain"
        ],
        "parameters": [
            {
                "in": "header",
                "name":"Accept",
                "required": true,
                "type": "string",
                "default": "application/json; text/event-stream"
            },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    }
  },
In the swagger editor, this looks like:
curl -X 'POST' \
  'https://{my}.{api}.azurecontainerapps.io/mcp/' \
  -H 'accept: text/plain' \
  -H 'Accept: application/json; text/event-stream' \
  -H 'Content-Type: application/json' \
  -d '{
"a":5,"b":9
}'
but I still get the 406. I tried putting both MIME types in the "consumes". It ignores anything after the first item.

 
I have the same question (0)
  • Verified answer
    GO-20061201-0 Profile Picture
    Microsoft Employee on at
    The Accept header wants a comma between the mime types, not a semicolon.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 600

#2
chiaraalina Profile Picture

chiaraalina 126 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 116

Last 30 days Overall leaderboard