
I am trying to add user information from Graph into my Power App. I am able to have it display info about myself, but I can't get it to work for other users. Right now, I am just trying to have it return the info when i click a button.
The OnSelect function I am using for the button to return info about myself (which is working in my app) is:
Set(varMyProfile,Office365Groups.HttpRequest("https://graph.microsoft.com/v1.0/me","GET",""))
I want to have it search for a user and display the info. I am using this (the query works fine in Graph Explorer):
Set(varMyProfile,Office365Groups.HttpRequest("https://graph.microsoft.com/v1.0/users?$search="displayName:NAME"","GET",""))
(where the NAME is at the end, i put a specific name to search for). Right now, i am just trying to get it to return data for one specific hardcoded name. I will update it with an actual search box once i get this working. When I try this, I get this error - "Expected operator. We expect an operator such as +,*, or & at this point in the formula". Is there a different format I need to use to enter this Graph query?
Hi nathankidd,
To look up a specific user, the http request requires their unique id to be entered before the search query.
Here is a Microsoft Learn article for reference:
https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http