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]"):
The credentials have to be base 64 encoded, so using the HTTP Authentication section does not appear to be an option:
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!
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 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).
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.