# How do I add a fixed API query parameter to Power Platform custom connector requests?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Develop integrations (10–15%)
Updated: 2026-11-25T06:47:24.345483+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-custom-connector-policy-runtime-query-parameter.html

## Also asked as

- 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?

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**

* [Policy overview](https://learn.microsoft.com/en-us/connectors/custom-connectors/policy-templates)
* [Set Query String Parameter](https://learn.microsoft.com/en-us/connectors/custom-connectors/policy-templates/setqueryparameter/setqueryparameter)
* [Use custom code in a custom connector](https://learn.microsoft.com/en-us/connectors/custom-connectors/write-code)

Source: [AB-400: Custom Connectors with OpenAPI, Policies and Code](https://learningpathx.com/news/ab-400-custom-connectors-with-openapi-policies-and-code.html)
