cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drake
Advocate II
Advocate II

Invoke Web Service Action Issue: Multiple Headers

Hello,

We can successfully use the Invoke Web Service action when an API requires only one item in the Custom headers field (like "Authorization"), but when two items are required, the connection attempt fails due to an "invalid credentials" error.  Using the same header items, the connection is successful in the Postman app so we feel they are correct.   

 

We feel that Power Automate Desktop may be incorrectly formatting the header values when it sends the request or we are incorrectly formatting them in the Custom headers field.  To add to this concern, one of the headers requires a space in its value ("Authorization: Bearer [KEY]"):

 

drake_1-1623276047918.png

 

The credentials have to be base 64 encoded, so using the HTTP Authentication section does not appear to be an option:

 

drake_0-1623275945137.png

 

We have no way to viewing the request that is actually being sent out by Power Automate Desktop (I don't believe this is possible to see from within the app), but again the request works fine from Postman.  We have attempted using commas, semicolons, newlines, etc. to delimit the two header lines.  We have also attempted to include the header string in a variable and then reference the variable from the Custom headers field.  Unfortunately, nothing has worked so far.

 

Is anyone aware of how to view a request, how to format the text in the Custom headers field when there are more than one header and a space in value, or any other idea for how to resolve this issue?  Thanks!

6 REPLIES 6
richgunk
New Member

Did you ever get this to work? 

With our old automation app we had to prepend the base 64 string with "basic ".  I'm still troubleshooting our issue but I believe it is a server authentication issue.

 

yoko2020
Resolver II
Resolver II

@drake 


@drake wrote:

 

Is anyone aware of how to view a request, how to format the text in the Custom headers field when there are more than one header and a space in value, or any other idea for how to resolve this issue?  Thanks!

 

Use Fiddler https://www.telerik.com/fiddler/fiddler-classic


 

Add an & sign between items.  If you have a sniffer/WireShark you can see exactly what is being sent.

drake
Advocate II
Advocate II

@yoko2020 Check the body text in an app like NotePad++, with "View All Characters" turned on.  There is a chance there is character in the string causing this, that is not visible in "regular" mode.  Remove all extraneous characters (e.g. linefeed).

drake
Advocate II
Advocate II

@yoko2020  Also, replace semicolons with a newline character for new lines.

yoko2020
Resolver II
Resolver II

@drake 

I am answering your question, not asking a question. 🤔

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,453)