Reputation: 49
Part of the Azure Logic App workflow I need to send HTTPS request to our vendor site. I use HTTP Workflow component and enter URL in the follwoing format: https://username:[email protected]
I am getting the following error after workflow run: InvalidTemplate. Unable to process template language expressions in action 'HTTP_2' inputs at line '0' and column '0': 'Error converting value "https://[email protected]:[email protected]/auth/authentication/generateSecureAPIToken" to type 'System.Uri'. Path 'uri'.'.
Please help!
The same URL string, by the way works, when I copy and run in the Chrome browser.
Upvotes: 0
Views: 351
Reputation: 49
This is what I found. To get an answer I used a small bit of C# code to get me an encoded base-64 string:
var request = WebRequest.Create("https://websiteUrlWithoutUserNameAndPassword....com");
string authInfo = "username:password";
authInfo = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
From the C# debugger, take the value of authInfo
string. Use it in your "Logic App" HTTP component as a header:
key: "Authorization"
value: the content of the "authInfo" string
Upvotes: 0