IPP preservation failed for the OneDrive data sources with the error message We can't apply this policy to [OneDrive Account Address] because the site is locked in ReadOnly mode. Kindly follow the below steps to unlock ReadOnly Mode.
Steps to unlock the OneDrive from ReadOnly Mode
Process 1- Through Powershell Command
Step 1: Install and Open the SharePoint Online Management Shell.
Step 2: Connect to SharePoint with either of the following roles using the below-mentioned command:
Connect-SPOService -Url https://<domain>-admin.sharepoint.com -Credential <service account provided with Global Admin/SharePoint Admin role>
Step 3: Use the below Powershell command to unlock the site from ReadOnly mode
Set-SPOSite -Identity "<SiteURL>" -LockState "Unlock"
Process 2- Through UI
Note: The user accessing the Site Information page should be an Admin of the site. To verify if the user is an admin, kindly verify in the SharePoint Admin Center > Active sites as shown in the screenshot below.
Step 1: Navigate to the site, click on the Settings and choose Site Information from the Settings window.
Step 2: Select View all site settings from the Site Information window.
Step 3: To ensure that the site has the Site Policies feature activated, click on the Site collection features from Site Collection Administration.
Step 4: Confirm the “Site Policy” is under Active status. If not, activate the “Site Policy” feature.
Step 5: Select Site Policies from Site Collection Administration.
Step 6: Click Create to create a new policy that would put the site on ReadOnly mode.
Step 7: Enter the name of the policy and description
Select “Do not close or delete site automatically.” from the Site Closure and Deletion section.
Enable “The site collection will be read-only when it is closed.” under the Site Collection Closure section.
Step 8: Under Site Settings, select Site Closure and Deletion from Site Administration.
Step 9: Select the created policy from the Site Policy dropdown and click OK.
Step 10: Navigate to Site Closure and Deletion again and select the “Close this site now” button and click OK.
Step 11: The below message will be displayed stating that the site is in read-only mode.
Step 12: To remove the site from ReadOnly mode, click “Open this site” and click OK.
After following these steps and unlocking ReadOnly Mode apply preservation to the failed OneDrive data sources.