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 Automate / Connector Search User ...
Power Automate
Unanswered

Connector Search User - User not found - Applying logic for User not found

(0) ShareShare
ReportReport
Posted on by

Hello 

Am trying to apply logic for a case whereby a user may not be found when using the connector Search User. The body returns [] for when a user is not found.

 

image.png

 

 

 

Nonetheless I have tried to apply the following logic and still no luck, such as 

equals(length(body('Search_for_users')), 0)

equals(length(body('Search_for_users')), 0)

 

 

To stop the process from looping, I have put in a condition if Display Name is not equal to "Input field" then send me a notification.

image.png

 

 

The flow does not ever get to this point but seems to execute the "no" condition 

 

 

 

 

image.png

image.png

 

Basically, if user is not found I want the next step to be send me a notification. Has anyone been able to apply logic when user not found ? At this stage body contains [ ] 

 

Any guidance on this would be much appreciated.

 

Thanks

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,143 on at

    Hi @Anonymous 

     

    Use condition action in Flow

     

    length(body('Search_for_users')) is equal to 0
    length(body('Search_for_users')) - expression
     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Community Power Platform Member Profile Picture
    on at

    Hello Reza

     

    Thanks for your feedback. I have tried to apply the logic but still does not work. Irrespective if a valid user name has been entered, the flow seems to loop through a list of names. I had to cancel the flow as I was worried that it was looping and sending off incorrect emails to users.

     

    image.png

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard