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 / Power Apps / Override HTTP Request ...
Power Apps
Suggested Answer

Override HTTP Request Header in Custom Connector from Power Apps

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I am struggling with a Custom Connector issue in a Canvas App. I am trying to perform a PATCH request to an API that requires the Content-Type application/json-patch+json. The body must be a valid JSON Patch array.

The Problem:
Even though I have defined the consumes type as application/json-patch+json in the Swagger file and I am passing the header explicitly in the Power Fx formula, Power Apps keeps overriding the Content-Type header to application/json in the actual network call.

What I have tried:

  1. Standard Approach: Defined the body as an array in Swagger. Power Fx:
    Connector.PatchAction(id, "application/json-patch+json", [{op: "replace", path: "...", value: "..."}])
    Result: Power Apps forces Content-Type: application/json and the API returns 415 Unsupported Media Type.

  2. The String Trick: Changed the Swagger body schema to type: string to prevent Power Apps from interpreting the object. Power Fx:
    Connector.PatchAction(id, "application/json-patch+json", JSON([...], JSONFormat.Compact))
    Result: The Power Apps Monitor shows the header is still being overwritten or the body is being double-escaped as a string literal, which the API also rejects.

  3. Static Header in Swagger: Set the header to internal with a default value in the Swagger file.
    Result: Power Apps seems to ignore the internal default and still applies its own logic based on the body's data type.

Current Request Details (from Monitor):

  • Method: PATCH

  • Actual Header sent: "Content-Type": "application/json" (should be application/json-patch+json)

  • Expected Body Format: [{"op":"replace", "path":"/registeredUser", "value":"user@mail.com"}]

Question:
How can I force a Power Apps Custom Connector to respect the application/json-patch+json content type when sending an array/object? Is there a way to stop the "intelligent" header overriding behavior of the Power Apps runtime?

I have the same question (0)
  • Vish WR Profile Picture
    1,102 on at
     

    Power Apps might auto-overrides content type  based on the request body type, and:

    If the body is an object/array, it forces application/json

    Even if you set application/json-patch+json, it often gets ignored at runtime

    Try creating a valid JSON text 

     

    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥


     
  • Suggested answer
    11manish Profile Picture
    1,422 on at
    You cannot force Power Apps Custom Connector to respect application/json-patch+json due to built-in runtime behavior.

    The correct and reliable approach is:
    • Use Power Automate (HTTP action) or an Azure Function proxy to send the request with full control over headers and body.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard