cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Check if user already exists in Office365

We'd like to verify if a username already exists in Office365, but when we do Office365Users.SearchUser({searchTerm:USERNAME}) and the user is not found, there's this big red pop up error at the top of the app. Is there another way to verify this without getting an error when the lookup returns no results?

Thank you !

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hello,

 

Do you see that error on a mobile device or in the browser? The folloiwng seems to work for me:

Label1.Text=IsBlank(First(Office365Users.SearchUser({searchTerm:"user_that_does_not_exist"})).DisplayName)

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

Hello,

 

Do you see that error on a mobile device or in the browser? The folloiwng seems to work for me:

Label1.Text=IsBlank(First(Office365Users.SearchUser({searchTerm:"user_that_does_not_exist"})).DisplayName)

View solution in original post

Hi, thank you for helping!

The error pops up on browser. On your formula doesn't IsBlank return a boolean ?

You are correct. IsBlank returns a boolean.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,237)