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

Notifications

Announcements

Community site session details

Community site session details

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

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

(0) ShareShare
ReportReport
Posted on by

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard