How to Get a User by Microsoft User ID via Power Automate Graph API
Question details
The user wants to retrieve a specific user profile using a unique Microsoft User ID or display name in Power Automate.

- Product
- Power Automate
- Device & OS
- not provided
- Scenario
- Identifying a user profile using the Send an HTTP Request V2 action when only the unique ID or display name is available.
- Observed behavior
- The action returns an invalid Graph endpoint error when attempting to filter users by their ID.
Ensure you have the necessary Microsoft Graph API permissions (such as User.Read.All) granted and consented in your Entra ID app registration before executing the HTTP request.
Correct the Graph API Endpoint Syntax
Use the exact Microsoft Graph dynamic endpoint syntax to retrieve the user directly by ID instead of passing literal text.
The 'invalid Graph endpoint' error typically occurs when the HTTP action processes the endpoint as a literal string rather than recognizing dynamic user ID values.
Navigate to your Power Automate flow and expand the 'Send an HTTP Request V2' action block.
To get a user directly by their unique identifier, set the URI field to 'https://graph.microsoft.com/v1.0/users/{user-id}'. Delete the literal text '{user-id}' and replace it with your actual dynamic content variable representing the user's ID.
If you are filtering by a property instead of using a direct ID path, format the URI using OData syntax, such as 'https://graph.microsoft.com/v1.0/users?$filter=id eq 'your-dynamic-id''. Ensure the dynamic value is wrapped in single quotes.
Save your flow and run a test to confirm the action correctly parses the dynamic user ID and returns a 200 OK status.
Switch to WPS Office for a Streamlined Office Experience
While Power Automate handles complex Microsoft ecosystem workflows, everyday document productivity doesn't have to be complicated. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for all your daily document, spreadsheet, and presentation tasks.

Frequently Asked Questions
Why do I get an 'invalid Graph endpoint' error in Power Automate?
This error occurs when the endpoint URL is malformed. It often happens if you accidentally pass a literal string like '{id}' instead of inserting an actual dynamic ID variable from a previous step, or if your OData filter syntax is formatted incorrectly.
Can I search for a user by display name instead of ID?
Yes, you can use the Graph API filter parameter to locate a user by name. Set your URI to 'https://graph.microsoft.com/v1.0/users?$filter=displayName eq 'John Doe''. Keep in mind that this method requires the appropriate tenant read permissions.
How do I ensure my Power Automate HTTP request has the right permissions?
You must check the Entra ID (formerly Azure AD) app registration associated with the HTTP connector. Verify that API permissions like 'User.Read.All' are properly added and that a global admin has granted admin consent for your tenant.




