I'm trying to use the HTTP action to make a call to the Microsoft Graph API to query all active AD users using a certain filter. I've setup the application and bearer token already. It works if I make a call to just the users endpoint (https://graph.microsoft.com/v1.0/users) like this:

But when adding in a filter like this:
https://graph.microsoft.com/v1.0/users?$filter=endsWith(mail,'company.com') and JobTitle ne null&$select=userPrincipalName
It says "Enter a valid URI"

I've added this URI to a variable to get around the error, but when it runs it says "Unsupported Query"
"error": {
"code": "Request_UnsupportedQuery",
"message": "Unsupported Query.",
I see that there is a Queries section on the HTTP action, but I haven't figured out what format to put my query in to get it to work.
Also I already tested this query in the graph explorer and it works so the problem is not there.
Thanks for your help.