One or more fields contain incorrect values | Error while adding logic app standard workflow as operation in Azure APIM

{tocify} $title={Table of Contents}

Issue

While trying to import Logic app standard workflow in APIM , got below error

One or more fields contain incorrect values: '=' is an unexpected token. The expected token is


One or more fields contain incorrect values:

'=' is an unexpected token. The expected token is ';'. Line 16, position 137.


Why it happened 

The error is pointing out about line 16 where it expects ';' .

Below are highlighted places where it expects ';' however it found &, but it is to separate the query parameter so it has to be there.

/lawf-sample1/triggers/When_a_HTTP_request_is_received/invoke?api-version=2022-05-01&sp=%2Ftriggers%2FWhen_a_HTTP_request_is_received%2Frun&sv=1.0&sig=gr-bCDsemB9Rrup1IHlaOq4Ye7ca8QnOVZHVgzcPCGo



Then why error was shown?

The ampersand (&) is a special character in HTML and XML, and it can be used to represent other characters, such as the greater-than (>) and less-than (<) signs. In a URL, the ampersand can also be used to separate multiple query parameters.

However, if you do not encode the ampersand, it can be interpreted as a special character by the browser, which can lead to errors as we got. 



What to do

So in our URL there are three query parameter thus three ampersand(&) to separate them.

To avoid this problem, you should always encode the ampersand in a URL. You can do this by replacing it with the HTML entity &amp;

/lawf-sample1/triggers/When_a_HTTP_request_is_received/invoke?api-version=2022-05-01&amp;sp=%2Ftriggers%2FWhen_a_HTTP_request_is_received%2Frun&amp;sv=1.0&amp;sig=gr-bCDsemB9Rrup1IHlaOq4Ye7ca8QnOVZHVgzcPCGo


This will ensure that the ampersand is interpreted as a regular character, and it will be able to find the query parameter.

Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post