Forum Discussion

sparrish123's avatar
sparrish123
Copper Contributor
Nov 20, 2025

Not able to recreate Teams Sharepoint site after perm deleting.

I'm trying to rename a Sharepoint site to a site that I permananetly deleted but I keep getting Write-Locked. 

{"odata.error":{"code":"-105","message":{"lang":"en-US","value":"This site address can't be changed.\r\nThis | site is write | locked.\r\n"},"MultiGeoService.ExceptionType":"MultiGeoServiceException","MultiGeoService.ExceptionContext":"{\"Errors\":[{\"ErrorCode\":-105,\"ErrorMessage\":\"This site is write locked.\"}],\"Warnings\":[]}"}}

 

I'm using this command to rename the site

Rename-PnPTenantSite -Identity $teamsURL -NewSiteUrl $updatedteamsUrl -Wait

1 Reply

  • virendrak's avatar
    virendrak
    Brass Contributor

    When you permanently delete a Teams‑connected SharePoint site, Microsoft doesn’t immediately free up the URL. The site object is placed in a “write‑locked” state for a period (often 30 days or more) to prevent accidental reuse or conflicts. That’s why your Rename-PnPTenantSite call fails, the target URL is still reserved, even though the site is gone.

     

    1. Check Deleted Sites in Admin Center
      • Go to SharePoint Admin Center > Sites > Deleted sites.
      • If the old site still appears there, you can’t reuse its URL until it’s fully purged.
    2. Force Purge (if you’re a tenant admin)
      • Use PowerShell to remove the deleted site permanently:
        Remove-SPODeletedSite -Identity https://tenant.sharepoint.com/sites/OldSiteName
        This clears the URL reservation.
        Note: Even after purge, Microsoft may hold the URL for a short retention period.
    3. Wait for URL Release
      • Microsoft sometimes enforces a cool‑down period before a URL can be reused.
      • If you’ve already purged, you may need to wait until the lock expires.
    4. Use a New URL
      • If you need the site immediately, provision it with a slightly different URL (e.g., SiteName2).
      • Later, when the original URL is released, you can rename again.

Resources