Skip to main content
Community site session details

Community site session details

Session Id : sJvQyNdT2DLZyryZzv1Iyo
Power Automate - General Discussion
Answered

Creating a dynamic SharePoint list based on a AD group?

Like (0) ShareShare
ReportReport
Posted on 24 Nov 2023 10:33:40 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
    26 on 28 Nov 2023 at 12:18:52
    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
    8,688 Moderator on 25 Nov 2023 at 08:23:25
    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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Loading complete