Forum Discussion

paulwrighteous's avatar
paulwrighteous
Copper Contributor
Aug 02, 2024

Issue with deleting an M365 group - Can't remove the excluded group from retention policy

We have a retention policy in place for all groups within the org.

To my understanding should a request come in from a user asking to delete a Teams SharePoint site, we have to add the group  attached to this SharePoint site to the excluded list within our Group retention policy. This then removes the retention from the SP site so we can then delete the site which also deletes the group.

When I then try to remove the group from the excluded list in the retention policy it errors as the group no longer exists within the tenant. Due to this, the policy then ends up in an 'error' status. How do I get the policy to a status of success? After running tests, the only way I have been able to remove the group from the excluded list in the retention policy is to restore the group but this of course restores SharePoint site which is back to square one.

Am I missing a trick here? How can this be by design if not?

Thanks


  • StephenRadley's avatar
    StephenRadley
    Copper Contributor

    paulwrighteous I am just chiming in because I'm having the exact same problem, and it's only been a problem in the last week or so. Previously, after deleting the group I didn't want anymore, I was able to remove it from the retention policy. Now I receive this error, which seems to match the behavior you're reporting:

     

    Could not run the command Set-RetentionCompliancePolicy. Cause of the problem: Could not find recipient 'email address removed for privacy reasons'. If newly created please retry the operation after sometime. If deleted or expired please reset with valid values and try again.

     

    If I run get-retentioncompliancepolicy -identity "retentionpolicy" -distributiondetail | fl I get some more details, but they're not helpful:

     

    DistributionResults : {{"Endpoint":"[SharePoint]email address removed for privacy reasons","ObjectId":"02a
    366ad-746b-4536-82d9-0c71cabca9c3","ObjectType":"Scope","Workload":"ModernGroup",
    "ResultCode":"FailedToOpenContainer","ResultMessage":"The mailbox or SharePoint
    site may not exist. If this is incorrect, please contact Microsoft support.
    Otherwise, please remove it from this policy."

     

    You know what Microsoft, I'd love to, but I can't. Anyone have any insight?

    • Zolla715's avatar
      Zolla715
      Copper Contributor

      I've raised ticket with Microsoft and the PG team have come back to say it is by design which I cannot believe. This used to work and only started happening in the last few months. Dare I say but this might have something to do with the chargeable SharePoint archive feature they have recently released.

Resources