Whenever the expiration policy changes a calculation will be done based on the group creation date. You can find the group creation date by using Microsoft Graph. From the top of my head, if you install the Microsoft.Graph PowerShell module and connect with a user with sufficient permissions you could use the Get-MgGroup cmdlet. Make sure to pass along the -Property argument and include createdDate and createdDateTime.
How to check o365 group expiration prior to turning rule
We're looking at enabling group expiration for O365 groups in Azure AD (groups > expiration)
Is there a way to audit what groups would be triggered by this policy before enabling it?
According to this page https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-lifecycle - groups older than the expiration once the policy is set will be set to 35 days
So my understanding is, if we set a policy for expiration after 180 days, and there's a group that was 200 days since last activity, it's given a grace period of 35 days, correct?
My hope is there is some way we can audit this to know the impact before we turn it on. If there's suddenly going to be hundreds of alerts being sent out, that would be good to know before activating this policy.