O365 Group/Team Needs Same Membership as Dynamic DL RRS feed

  • Question

  • Hi, what can we do (maybe PowerShell and a scheduled task?) to look at a current dynamically updated DL and have it compare to an O365 Group/Team and apply any changes? 

    I have a O365/Teams group that needs to have the same membership as a Distribution List we have. The distribution list is updated every 30 minutes and is accurate and we don’t want to have to have a separate mechanism to do the same thing for this O365/Teams group because we don’t want to use an AD attribute for it to trigger membership. We had issues with the distribution list using this method not being accurate as no one was updating the AD attribute so people who used to be in the department but transferred were still getting email to the group because no one went in and removed the attribute and new people weren’t getting the messages for the same reason. So now, we have another program now that updates this list and it is accurate within every 30 minutes without human error of manually updating an AD attribute. So, this O365/Teams group needs to be populated with the same membership as this distribution list but our tool can’t do that with O365/Teams so we were wanting to place the DL group as a member of the O365/Teams group, that way everyone in it would also be in the O365/Teams group but MS says we cannot do this and that we would need to have a powershell script that runs on a scheduled task to check and compare both groups and make the updated changes.

    I need this O365/Teams group to be updated with the same membership dynamically as the DL without administrative manual updating like manually having to go into AD and update an attribute. Any scripts I can run and set to run daily/hourly?

    Thank you.

    • Edited by ÁNLEIFR Thursday, March 28, 2019 1:55 PM
    Thursday, March 28, 2019 1:50 PM