logo
search
Others

How to Get a User by Microsoft User ID via Power Automate Graph API

Nimra MalikNimra Malik Oct 10, 2026 868 views

Question details

The user wants to retrieve a specific user profile using a unique Microsoft User ID or display name in Power Automate.

How to Get a User by Microsoft User ID via Power Automate Graph API
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the HTTP Action

Navigate to your Power Automate flow and expand the 'Send an HTTP Request V2' action block.

2
Update the Direct URI Path

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.

3
Format Filter Queries Correctly

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.

4
Save and Test

Save your flow and run a test to confirm the action correctly parses the dynamic user ID and returns a 200 OK status.

Community Support: Since this involves advanced Graph API formatting, consider posting your specific flow configuration in the Microsoft Power Automate Community if authentication or syntax errors persist.
Free Microsoft Office alternative

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.

Highly compatible with Microsoft Word, Excel, and PowerPoint formatsLightweight application that runs smoothly on any deviceFamiliar, easy-to-use tabbed interface for seamless migrationBuilt-in PDF editing and conversion tools
microsoft office alternative - wps office

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.