Microsoft Graph Rest API v1.0 --- HTTP GET Request

I’m trying to make a get request exactly like in the documentation below for exactly that use case: get the users that contain some letter eg. ‘wa’           I get the following error:   {"error":{"code":"BadRequest","message":"Syntax error: character ':' is not valid at position 11 in 'displayName:wa'.","innerError":{"date":"2022-01-05T20:33:23","request-id":"69208953-3831-4d35-890a-53301705a487","client-request-id":"69208953-3831-4d35-890a-53301705a487"}}}   Also, I’ve been trying to use a $filter with contains   like this for example:   from :   But as somebody suggests:  in the doc it says : "The contains string operator is currently not supported on any Microsoft Graph resources"        UPDATE:   Error message: Illegal character in query at index 47:$search="displayName:'wa'"&$select=displayName,givenName,postalCode,jobTitle,mail,mobilePhone,officeLocation,usageLocation,userPrincipalName,city,country,department,surname,displayName   Illegal character in query at index 47 is “=” but I don’t understand what’s wrong about it  :( :( :(    Simplified HTTP link --->  Illegal character in query at index 47:$search="displayName:wa"  Also tried like this with --- 'wa' ---: Illegal character in query at index 47:$search="displayName:'wa'"     Tried using encoded URL directly in HTTP request in mendix microflow:   Got the following error:   Stacktrace: Error calling REST service     at A3Creator.WEB_Get_UserList_ForUserSearchHelper (CallRest : 'Call REST (GET)')     at A3Creator.ACT_SearchUserFromContactBook_AdvancedSearchFilter (SubMicroflow : 'WEB_Get_UserList_ForUserSearchHelper') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:65) Caused by: org.apache.http.client.ClientProtocolException     at com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17) Caused by: null     at java.base/ Method)     at com.mendix.integration.util.PrivilegedUtil$.$anonfun$withPrivileged$1(PrivilegedUtil.scala:13)     Error message -→ “Target host is not specified”    
2 answers

It looks like you're using a single quote instead of a double quote before and after the display parameter. 

What usually helps is to set the request URL in a string variable, so you can debug and see what URL is being called . In string concatenation, using quotes often goes wrong the first time :) . You need to escape single quotes with an extra quote. 

Can you post the string that is created and called in the rest action? 


Made$search="displayName:wa" work by encoding ----"displayName:wa"------

Encoded result → %22displayName%3Awa%22

Final HTTP request string --->$search=%22displayName%3Ade%22&$select=displayName,givenName,postalCode,jobTitle,mail,mobilePhone,officeLocation,usageLocation,userPrincipalName,city,country,department,surname,displayName


Also very important for it to work we need the following headers (ConsistencyLevel:eventual -→ very important)