cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RyanMesser
Frequent Visitor

406 NotAcceptable

Hi,

I created a custom connector to an extrenal CRM system and I wan't to via their api pull all the customers. I have been able to do this in postman and in the custom connector when testing (I'm using an API key). 

 

I'm not sure what I'm doing wrong in flow but I get this in flow, I assume something maybe I should be sending that I'm not? I can't see what though as the test in powerapps works (i even get the customers returned there) on the connector page.

flowerror.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for the response, 

 

Yes I knew due to getting 406 that in the Flow  it isn't liking something i was sending. I had a suspicion that it was the Content-Type as it should be sent application/json. 


For some reason although not required in the Power Apps test section or postman I had to add in the header

Accept application/json (I was already sending Content-Type application/json) but I noticed on the response intially the content type was text/html which isn't correct.


So for clarity I had to add accept: application/json to the header for it to work. 

 

Thanks

 

Ryan

 

 

View solution in original post

4 REPLIES 4
tonmcg
Frequent Visitor

According to MDN (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406), this is an error produced by the server when the response it's trying to send doesn't conform to the format defined by one of your request headers. Put another way, your request asked for the response to be in British English but the server responded in Australian English. This isn't allowed.

According to MDN:

If a server returns such an error status, the body of the [error] message should contain the list of the available representations of the resources, allowing the user to choose among them.

The error message you received should contain a clue about the format of the response the server tried to send and the format your request told it to send.

The format defined in one or more of the following headers should match in both the request and the response:
Accept
Accept-Charset
Accept-Encoding
Accept-Language

Tony

Thanks for the response, 

 

Yes I knew due to getting 406 that in the Flow  it isn't liking something i was sending. I had a suspicion that it was the Content-Type as it should be sent application/json. 


For some reason although not required in the Power Apps test section or postman I had to add in the header

Accept application/json (I was already sending Content-Type application/json) but I noticed on the response intially the content type was text/html which isn't correct.


So for clarity I had to add accept: application/json to the header for it to work. 

 

Thanks

 

Ryan

 

 

That's good to know. Glad you solved it.

Quick question: since Flow routes requests through Azure, how do monitor and debug network traffic?

That's good to know. Glad you solved it.

Quick question: since Flow routes requests through Azure, how do monitor and debug network traffic?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (4,207)