Notifications
Announcements
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!
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,KrishnaIf 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.
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.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268