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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 633

#2
Vish WR Profile Picture

Vish WR 301

#3
Haque Profile Picture

Haque 216

Last 30 days Overall leaderboard