Reputation: 615
I'm relatively inexperienced with the Graph API. I have a query returning a user by using the $search query paramter:
/v1.0/users/?$search="displayName:Test"
This works as intended. However, ultimately, I would like to get this user's manager. So how do I write the query? I tried adding another endpoint (is /manager called an endpoint?):
/v1.0/users/?$search="displayName:Test"/manager
But this throws the error:
Syntax error: character '/' is not valid at position
Is it not possible to do that in one call?
Thanks for your help.
Upvotes: 0
Views: 40
Reputation: 20595
You have to call two endpoints.
First endpoint to find the user
/v1.0/users/?$search="displayName:Test"
It will return the response with user id for the second call to get user's manager
/v1.0/users/{userId}/manager
Upvotes: 1