cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frank37
Helper I
Helper I

Custom Connector: special Header 'Content-type' not sent

I've got a custom connector and one action needs a special header

"Content-Type": "application/x-www-form-urlencoded"

so I defined it:

Bildschirmfoto 2019-10-04 um 21.31.53.png

 

The test function works without error: 

Bildschirmfoto 2019-10-04 um 21.36.39.png  Bildschirmfoto 2019-10-04 um 21.36.51.png

 

problem:  

 

If I use this action i my PowerApp, the "Content-Type" is missing in the header and I get the error 415

{
  "timestamp": "2019-10-04T18:59:26.658+0000",
  "status": 415,
  "error": "Unsupported Media Type",
  "message": "Content type '' not supported",
  "path": "/auth/token"
}
 
I've testet the header-parameter with
  • visibility=internal (and "application/x-www-form-urlencoded" ist the default value)
  • Visibility=non and transfer the "application/x-www-form-urlencoded" as a parameter to the action

 

Any ideas?

Frank

1 ACCEPTED SOLUTION

Accepted Solutions

Here is the solution from GonzaloR (worked for me 👍)

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Custom-connector-action-with-x-www-form-u...

 

  1. Click "New Policy"
  2. Name your policy
  3. Select "Set HTTP header"
  4. Select the Operations (Actions) that require this header
  5. Header name: "content-type"
  6. Header Value: "application/x-www-form-urlencoded"
  7. Action if header exists: "override"
  8. Run policy on: "Request"

 

View solution in original post

3 REPLIES 3
v-monli-msft
Community Support
Community Support

Hi @Frank37 ,

 

Please check if below blog could help:

https://www.engineeredcode.com/blog/powerapps-portals-support-for-x-content-type-options-http-header

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Mona,

 

thanx for your reply.

But your solution belongs only to "PowerApps Portals" (the PowerApp is the host) and my PowerApp is the client (and the server supports the X-content-type option)

 

Frank

Here is the solution from GonzaloR (worked for me 👍)

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Custom-connector-action-with-x-www-form-u...

 

  1. Click "New Policy"
  2. Name your policy
  3. Select "Set HTTP header"
  4. Select the Operations (Actions) that require this header
  5. Header name: "content-type"
  6. Header Value: "application/x-www-form-urlencoded"
  7. Action if header exists: "override"
  8. Run policy on: "Request"

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (43,375)