Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to check if user exists with Power Automate

Posted on June 8, 2025June 8, 2025 by Tom

“I’d like to check whether a user with specific email address exists in our company’s Active Directory, can I use Power Automate to do that?”


When you’re working with email addresses, there’s always a difference whether it’s an internal or an external address. If it belongs to a user from your company, it servers as a unique identifier of the user, something you can use in all the M365 applications to reference this user. You can get detailed information, send him emails, teams messages, assign tasks, and much more – as long as the user exists.

But how do you recognise whether it’s somebody from your company? And if this user is still active or already left?

Option 1: Use ‘Run after’ after the ‘Get user profile’ action

If you know the user email address or user id, you can use the ‘Get user profile’ action. You’ll either get the user information or an error – User not found.

But you can take it as a valid result (as when updating files) using the ‘Configure run after’ settings on the following actions.

Set the action to run after the ‘Get user profile’ has failed and define what to do when the user doesn’t exist.

Power Automate check user exists

Option 2: Use the ‘Search for users’ action

Another approach is to use the ‘Search for users’ action. Use the email address as the Search term and evaluate the action result.

If the result is empty, the user doesn’t exist.

The benefit of this approach is that if the user exists, you’ll get an additional information, e.g. whether the account is enabled.

Use it in a condition to make sure that the user is really available.

empty(outputs('Search_for_users_(V2)')?['body/value']) = false
and
first(outputs('Search_for_users_(V2)')?['body/value'])?['AccountEnabled'] = true
user exists Power Automate

Option 3: Search for the user with an HTTP request

The last option is to use an HTTP request to the Office 365 Users. As explained in the previous article, you can search for a user using more properties than with the ‘Search for users’ action. Similarly, the HTTP request won’t fail for non-existing users, it’ll return either the user or an empty array.

Method: GET

Uri:
https://graph.microsoft.com/v1.0/users?$filter=<property> eq '<value>'

Check whether the output is empty (user doesn’t exist) or not (user exists), and continue accordingly.

empty(body('Send_an_HTTP_request')?['value'])
check if user exists with power automate

Summary

You’ve got three options how to check whether a user exists using Power Automate – two standard actions or an http request. With the standard actions it’s up to your preference – you can either ask for the user profile directly and take the error as a valid output, or search for the user in combination with a condition. The HTTP request will then allow you searching by any property, on the other side you must extract the user information from the response JSON.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

3 thoughts on “How to check if user exists with Power Automate”

  1. Sandy says:
    June 21, 2023 at 1:44 am

    Hi,

    How can we send email to O365 group email address when it is in ‘CC’ email body from power automate. Get user profile doesn’t recognize group/distribution list email and return user not found error.

    Reply
    1. Tom says:
      August 12, 2023 at 11:03 pm

      Hello Sandy,
      you can just type in the email address if you know it, no need to get user profile.

      Reply
  2. UJ says:
    August 19, 2024 at 8:12 pm

    I’m using get user profile for this particular flow, it has two apply to each actions and the get user profile is in the last apply to each action. It was tested and was working fine. But in production, the flow is running for hours. It’s a scheduled flow… Do you think changing it to a HTTP request would change that?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Are your approvals stuck due to unavailable approvers?

Keep your approvals running with the Approval task delegation app! Reassign any existing approval task to another user with a single click - no more waiting for absent approvers!

Power Automate approval task delegation ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes