Ohh I havent published something here for a while, was quite busy during the peak of pandemic as we had do downsize our resources at the same time supporting the same amount of applications, add to that new projects on the pipeline. During these time I heavily invested in migrating a lot to Azure in effort to reduce cost and manage things real easy. All of our new stuff is all developed with Cloud in mind so Azure is our primary cloud provider.
Now how does that relate to our post today? Well with Azure I started to use Logic Apps a lot, its a very versatile solution to many things specially when it comes to integration, specially with Cloud API’s everywhere, this Logic Apps can do a lot of things, even create reusable API’s that does the heavy lifting before consuming other microservices, basically its like a mini MuleSoft. As I use it a lot I encounter issues once in a while and one of them is our topic today. Basically when I use the built in HTTP to invoke a REST API when I use Graph API’s filter parameter with eq operator, I am getting this Enter a valid URI Error, I know it is valid since this is documented in Microsoft, and it also runs fine on Postman but then I place that URI on the URI Section of the HTTP component then that error happens, its annoying and you can’t save it.
Basically my URI is as simple HTTP GET call to output users where usage location is NZ.
It looks like this https://graph.microsoft.com/v1.0/users/?$filter=usageLocation eq ‘NZ’&$select=id,displayName,mail&$count=true”
I know that works because it returns my expected result in Postman like such
But in Logic Apps I get something like this
and if that happens you cannot save it, which is quite annoying specially when you have created a lot of elements already on your Logic App
But don’t worry there is a workaround and its quite simple, its just an added step to take when saving your Logic App
The solution, welcome to the Code View
Don’t worry you don’t have to change the code or write additional codes to make it work, all you need it to go there to skip the client side validation of the form and save it.
Simple as that. So just add that URI that fails on the designer section, disregard the error and just toggle code view to save. That simple
and yes now it works
You can thank me later. 😜