web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to check if a User...
Power Apps
Answered

How to check if a User exists in organization through Office365Users?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I know that Office385Users.SearchUser() returns a string, but how do I check if a User exists in the org using SearchUser? When I did IsBlank(Office385Users.SearchUser({searchTerm: text.Text}), it is supposed to return "true" if the user doesn't exist. But instead, it returned false even when the user I put in doesn't exist. Is there an alternative way to check if a user still exists in an org?

 

Thank you!

Categories:
I have the same question (0)
  • Verified answer
    KrishnaV Profile Picture
    5,023 on at

    hi @Anonymous ,

     

    try this:

    IsBlank(LookUp(Office365Users.SearchUserV2().value, Mail = textInput.Text).Mail)

     
    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • smuksud Profile Picture
    4 on at
    IsBlank(LookUp(Office365Users.SearchUserV2().value, Mail = textInput.Text).Mail)

    The solution shown above does not work for a scenario where there are more than 1000 users in the tenancy. Because SearchUserV2 function returns top 1000 users. So if the user you are looking for is not within first 1000 users then the code snippet will always return TRUE. I have used following instead:

     

     

    IsEmpty(Office365Users.SearchUserV2({searchTerm:textInput.Text}))

     

     

    You can use SearchUser function as well. Works for me.

    Note: checking IsEmpty because SearchUser/SearchUserV2 function returns collection of User objects.

  • srose Profile Picture
    94 on at

    Thank you! I used IsEmpty as in your suggestion and get a nice true or false which I then use in other formulas.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard