The way to remove someone from a Dynamic group is to adjust the membership filter/rule. The way to perform this on a given date/time is to schedule it via PowerShell script or similar.
Dynamic Group Question - How can I remove a user from a dynamic group on specified date and time?
Hi,
I have created a dynamic group, and setup my dynamic membership rule so that my user gets added to the group.
But, I want to put something in there that removes them from the group at a certain date and time.
Is this possible?
So what I am trying to say is :
- Add Bob into the Dynamic Sales group based on his department value of Sales.
- And then Remove Bob from the Dynamic Sales group after 01/05/2020 12:00PM
Thanks
3 answers
Sort by: Most helpful
-
-
thgibard-MSFT 356 Reputation points
2020-04-26T21:54:00.84+00:00 I've not done such script based on the time but I think you should take a look on Azure Automation. It could be executed directly in Azure rather than use a PowerShell script deployed on a server - https://azure.microsoft.com/fr-fr/services/automation/.
-
AmanpreetSingh-MSFT 56,311 Reputation points
2020-04-27T07:56:14.42+00:00 @Midiman You should consider using Access Review. Check https://learn.microsoft.com/en-us/azure/active-directory/governance/create-access-review for more details.
-----------------------------------------------------------------------------------------------------------
Please "Accept as answer" wherever the information provided helps you to help others in the community.