Announcements
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.
application/json-patch+json
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.
consumes
Content-Type
application/json
What I have tried:
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.
array
Connector.PatchAction(id, "application/json-patch+json", [{op: "replace", path: "...", value: "..."}])
Content-Type: application/json
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.
type: string
Connector.PatchAction(id, "application/json-patch+json", JSON([...], JSONFormat.Compact))
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.
internal
Current Request Details (from Monitor):
Method: PATCH
Actual Header sent: "Content-Type": "application/json" (should be application/json-patch+json)
"Content-Type": "application/json"
Expected Body Format: [{"op":"replace", "path":"/registeredUser", "value":"user@mail.com"}]
[{"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?
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
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 490
WarrenBelz 427 Most Valuable Professional
Vish WR 381