Automatically deleting a group if it hasn't been used?

New Contributor

Is there a way to automatically delete yammer groups if it hasn't been used for a year with the ability for the group admin to renew their group?


We are looking to eliminate groups that are not being used.

Thank you!

8 Replies
Yes, using Azure AD Expiration policies. However it requires Azure AD Premium licenses to do it thou. But here is the document.

Keep in mind that the Azure AD expiration policy doesn't check if the group is used or not. It simply sends emails as you reach the expiration date. Also note that the expiration policy will be applied to all O365 groups, regardless of where they have been created. You have the option to exclude specific O365 groups, but AFAIK this has to be done manually. This, of course, will only work for O365 connected Yammer groups. I'm not sure if I would recommend this though. I'm not a fan of deleting Yammer conversations as I consider it to be the "memory" of a company, but that's just me. What I do is add "archived" to the name of the group and "this group is not monitored" to the description or I switch it to private and remove the other members. Also note that after the group is expired, the O365 admin has only 30 days to restore it.

The requirement that the admin have the ability to renew the group makes it a little more of a challenge.  Typically the way to "delete" a group but allow it to be easily brought back at any time is to remove all the users from the group.  If the Yammer groups are also Office 365 Groups, then you should be able to use typical PowerShell tools to remove the users programmatically.   


Finding the old groups - you can use the message export and build a report of the newest message per each group.  I'd start just with sort by group_id then a secondary sort by created_at (reversed), right from within Excel, just to get an idea of what you're looking at.  

According to this, the exclude feature is not currently available.



You're right. You can only apply it to all or selected groups. 

A new feature just added to Sharegate 'lifecycle management' might be able to help you if you are using O365 groups:





However this is for Office365 Groups.. What if one's Yammer groups are not mapped with Office365??

@Prachi Rasam the O365 group expiration feature only works for the connected Yammer groups. There is no out of the box expiration feature for normal Yammer groups.