A free program from Microsoft that provides developers with the tools, resources, and sandbox environments needed to build solutions for Microsoft 365.
Dear All,
Sorry for the lack of answer. I have gotten the solutionand made a KB about it.
Here my work.
I hope this will help.
Exclude site from retention policy (If you have any).
Issues : cannot delete sites or documents on Sharepoint due to hold.
To start you need the following Azure roles :
Sharepoint administrator, compliance administrator, Security administrator, Exchange administrator.
Wait once you validate ( and give the ticket reference number )
1. Edit the Retention Policy:
○ Go to the Microsoft Purview compliance portal : https://purview.microsoft.com/
○ Select Data lifecycle management > Microsoft 365 > Retention Policies.
○ Choose the policy you want to edit and select Edit Policy on the three dots.
Click on “next” 3 times :
○ Under Locations Applied, select "Let me choose specific locations" if not already selected.
○ Next to SharePoint Sites, click Exclude sites (if available). If it’s grayed out, proceed to the next step.
2. Exclude a Site from the Retention Policy:
○ Select Exclude Sites.
○ Enter the URL of the Sharepoint site you want to exclude and click the plus (+) button or “Enter” on the keybord.
○ Check the box for the site. You can add other sites if needed.
○ After entering all the sites to exclude, click Exclude at the bottom of the window and then Save.
3. Remove a SharePoint Site from the Retention Policy:
- Next to SharePoint Sites, select Choose sites.
- Click the “X” next to the site URL you want to remove from the policy.
- Click next (suivant) twice.
Select Done (Envoyer) and then Save.
If this isn’t enough to delete the document, you can go to disable the retention Policy in some cases (Never Delete).
Once this is done the policy is excluded from the site and then you will be able to delete contents in the SharePoint/OneDrive following the final steps below:
Also, Run Invalid Retention Policy https://aka.ms/PillarInvalidRetention, acknowledge and save.
Step 3: Free up SharePoint and OneDrive Space and Free up the Preservation Hold Library:
Add your account as a site admin in the Sharepoint administration center.
- Access the site as a Site Collection Admin.
- Empty the recycle bin as it is also calculated as part of your OneDrive storage quota.
- Check in the storage metrics for preservation hold library folder and empty it. (Find it through Site contents -> Site settings ->
(The preservation hold library is a folder created by retention policy to prevent deletion. This means that when a user deletes a file to the recycle bin and empties the content. an original copy of those files and folders would go to the Preservation hold library for compliance keeps as chosen in the retention policy and the folder would retain those files as much as it is requested to in the policy).
To empty the preservation, hold library, edit the URL to look exactly like this https://contoso.sharepoint.com/personal/user1_contoso_com/Preservationholdlibrary to be able to view the delete option.
In our example:
https://newrestgroup.sharepoint.com/sites/NewrestTravelRetailBusinesIntelligence-Spain/_layouts/15/storman.aspx?root=PreservationHoldLibrary
Is changed into :
This will allow you to easily find the files you want to delete.
- When the preservation hold library is emptied, it returns those files to the recycle bin where the contents can now be permanently deleted f there is no use for the files again.
- This should free up space on the SharePoint/OneDrive.
Re-enable the Retention policies if disabled entirely and if not just excluded.
If excluded, simply remove the address of the site from the exclusion list.