Thnaks for your reply,
I have a wierd issue, when I try the filter in POSTMAN, it return the correct record based on the provided email
but when I use it in groovy script, it return my all users instead of the filter record,
here is my method below :
public String getUserIdByEmailQuery(String AuthToken,String userEmail){
String _userId
def http = new HTTPBuilder(graph_base_user_url +"?")
http.request(GET) {
requestContentType = ContentType.JSON
query:[ $filter:"mail eq '$userEmail'" ]
headers.'Authorization' = "Bearer " + AuthToken
response.success = { resp, json ->
//_userId=json["id"].toString()
_userId=json
}
// user ID not found : error 404
response.'404' = { resp ->
_userId = 'Not Found'
}
}
_userId
}
The graph_base_user_url parameter is equal to "https://graph.microsoft.com/v1.0/users"
Any reason why it returns all users ?
regards