Study FAQ
How do I add a fixed API query parameter to Power Platform custom connector requests?
Also asked as 2
- How can a custom connector set an API version without asking every caller to supply it?
- Where should I configure the same required query value for a custom connector operation?
Answer
Use the custom connector's Set query string parameter policy when the API requires a small, nonsecret adjustment such as a fixed api-version. On the Definition page, add a policy with the query parameter name and approved value, choose what happens when the parameter already exists, and scope it to the relevant operations. Save the connector.
For source-controlled connector properties, this configuration is represented by a policyTemplateInstances entry with template ID setqueryparameter. Keep it alongside the reviewed connector definition. Make one layer responsible for the value so a caller and a gateway cannot each supply a different one.
If custom code is enabled, verify the combined runtime behavior because code takes precedence over the codeless definition. Send a controlled development request through the intended connection, then inspect sanitized backend evidence for exactly one agreed query parameter. Test any other operation that the policy could affect. Apply API authorization at the backend separately.
Microsoft references
Full explanation
AB-400: Custom Connectors with OpenAPI, Policies and Code
Study guide · AB-400
Read the full explanation