cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Cusom Connectors: Policy templates: expressions not working

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/expressio...

 

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

2 REPLIES 2
Highlighted
Community Support
Community Support

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/...

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (11,562)