Skip to main content

Notifications

Power Automate - General Discussion
Answered

Creating a dynamic SharePoint list based on a AD group?

(0) ShareShare
ReportReport
Posted on by 26

Hi 

 

I am trying to wrap my head around how to create a power automate flow that keeps a staff list updated to the current employees. 

 

I have an AD group that i keep updated with all my current employees, is it possible to keep a list updated so when a person is added to this AD group a power automate flow gets triggered to add this user to the Sharepoint list and vice versa when the user is removed from the AD group a flow is triggered to remove said user from the SharePoint List? 

 

  • WOTPRO Profile Picture
    WOTPRO 26 on at
    Re: Creating a dynamic SharePoint list based on a AD group?

    Thank you very much, it worked like a charm once i figured out how to use Filter Query and a few other bits. 

  • Verified answer
    Rhiassuring Profile Picture
    Rhiassuring 8,688 on at
    Re: Creating a dynamic SharePoint list based on a AD group?

    There's a Power Automate trigger called "When a Group Member is Added or Removed".  You can use that, and point it at the group you're monitoring.

     

    Next, a condition. You'll evaluate this condition:

     

    triggerBody()?[1]?['@removed/reason'] is equal to deleted
     
    If "true", then that means the user was removed. If "false", then a user was added.
     
    So on the "yes" path, you'll "Get Items" from your list, and Filter Query on the user to get the ID, and delete the record. 
     
    On the "no" path, you'll add a new record.

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard