“I need to find a user by his job title but Power Automate keeps asking for email or id, how can I use his role property instead?”
When you’re looking for more information about a user, you probably use the ‘Get user profile’ action. You input the user email or his id, and it’ll return his whole user profile. But what if you don’t have his email nor user id? What if you’ve got e.g. his job title, or a unique user code in your organisation? How do you find such user?

Use an HTTP request via Graph API
Since the default action won’t help (unless you want to get all users and then filter with the ‘Filter array’ action) you’ll have to look elsewhere. And the place to look is an HTTP request.
You’re looking for a user, meaning the endpoint to call is /users.
Method: GET
Uri:
https://graph.microsoft.com/v1.0/users
But such request would give you all the users, you don’t want that. You want only the users that fit a condition, a filter in the format below:
https://graph.microsoft.com/v1.0/users?$filter=<property> eq '<value>'
Add the Office 365 Users action ‘Send an HTTP request’ and enter the URI.

The response will be a JSON with all the users fitting the condition where you can extract the information directly with an expression.

Summary
When an action won’t help, use an HTTP request. While Power Automate has an action to get user profile, you can’t use it to find users using a different property than email or id. Luckily there’s a workaround by adding the filter directly into a request to Graph API. Add the $filter parameter, pick which property it should search in, and the value to look for.
This does not work.
I am using Send an HTTP request V2
https://graph.microsoft.com/v1.0/users?$filter=mail eq ‘caleb.howard@cottonteam.com’
error message:
URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource/object is not supported for this connector. Resources: groups. Uri: https://graph.microsoft.com/v1.0/users?$filter=mail eq ‘caleb.howard@cottonteam.com’
Hello Caleb,
I’ll have to update this article as the Groups V2 action is much more limited as they split the endpoints between actions for specific resources. This endpoint is now available in the ‘Send an HTTP request’ action in the ‘Office 365 Users’ group of actions.