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

Re: Cusom Connectors: Policy templates: expressions not working

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
Frequent Visitor

Re: Cusom Connectors: Policy templates: expressions not working

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (5,555)