web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cusom Connectors: Poli...
Power Apps
Unanswered

Cusom Connectors: Policy templates: expressions not working

(1) ShareShare
ReportReport
Posted on by 61

Hi,

 

In my Custom Connector I need an expression in the policy

see: https://docs.microsoft.com/en-us/connectors/custom-connectors/policy-templates/expressions/expressions

 

example:

I have a query parameter named "content-format"

 

I defined a policy

- template: Set HTTP-Header

- operation: (my action selected)

- header name: content-type

- header value: @queryParameters(‘content-format’)

- action if header exists: overide

- run policy on: request

 

If I test my action, the answer from the azure platform is:

 

{
 "error": {
 "code": 500,
 "message": "Invalid parameters template. No property names specified in @headers or @queryParameters or @connectionParameters expression",
 "source": "europe-002.azure-apim.net",
 "path": "choose[4]\\when[1]",
 "clientRequestId": "cecfe20d-ddfa-4384-8624-f1aa-63c8c81f"
 }
}

 

Where ist my error?

 

Frank

I have the same question (0)
  • v-yutliu-msft Profile Picture
    on at

    Hi @Frank37 ,

    Please check whether your api has access to the data source.

    You could try to switch off authorization and do firewall rule and On-Premises gateway connection for security.

    Here's a similar issue for your reference:

    https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Can-t-do-custom-connector-from-url/td-p/170750

    What's more, here's a doc about how to use this template that may help you for your reference:

    https://docs.microsoft.com/en-us/connectors/custom-connectors/policy-templates

     

     

    Best regards,

  • Frank37 Profile Picture
    61 on at
    Hi Yutliu, the API access to the data source is OK: If I do not use the policy, the action is sent successfully to the server. This error only occurs if I enable the policy for this action (but I need the policy to make the action work correct) Frank
  • ThamiMtombeni Profile Picture
    71 on at

    Hi @Frank37 ,

     

    Did you find a solution for this issue?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard