Exchange Online retention policy group based

GoodResource 306 Reputation points
2023-07-11T13:37:09.12+00:00

Hi,

We have separate category of users. Basically F3 users who won't have Archive, E3 who will have archive. Our retention policy tells emails older than certain years to move to Archive. For F3 there won't be any archive so we were thinking to apply retention policy to F3 users that emails older than certain years should be deleted. Is there a way an automated retention policy can be applied based on AD security groups? So basically users part of security group "x" will have specific retention policy.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,190 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 119.8K Reputation points MVP Volunteer Moderator
    2023-07-11T15:56:24.9566667+00:00

    No, not directly. But you can use a simple script that expands the group membership and assigns the corresponding retention policy. Something like this:

    Get-DistributionGroupMember groupname | % { Set-Mailbox -Identity $_.PrimarySmtpAddress -RetentionPolicy blabla }
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.