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 / Using Office 365 Searc...
Power Automate
Unanswered

Using Office 365 Search User (v2) to check for a list item

(0) ShareShare
ReportReport
Posted on by 75
Hi friends - 
What I am trying to do is fairly straightforward...
I keep an employee volunteer list in SharePoint.  I want to do a check every couple of weeks to make sure these employee volunteers are still employed with our company, and if they aren't, I want their list item removed.  I think I can build a PowerAutomate flow to accomplish this and this is what I have so far:
 
Here's a chunk of one of the outputs of Search for users (v2):
"body": {
        "value": [
            {
                "Id": "e86fbf1c-a5f7-4b65-b1df-1d79a8f678c4",
                "AccountEnabled": true,
                "BusinessPhones": [],
                "City": "Leverkusen",
                "CompanyName": "Bayer Aktiengesellschaft",
                "Country": "DE",
 
I would like to have a condition after this that searches the response to "AccountEnabled", because if the person is no longer with the company, theoretically, their account should no longer be enabled, right?  If the action shows the account is enabled, the list item is left alone.  If the action shows that the account is not enabled, I want the list item in SharePoint to be deleted.  
 
Am I going about this in the best way?  If so, how would you recommend setting up the remaining steps?
 
Thank you in advance for any guidance!
 
Categories:
I have the same question (0)

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard