If your organization is going through a rebranding, merger, or acquisition and needs to update the domain in your SharePoint and OneDrive URLs, you can change the domain name using PowerShell. For example, if your organization name changed from Contoso to Fabrikam, you can change your SharePoint URLs from contoso.sharepoint.com to fabrikam.sharepoint.com.
Advanced Tenant Rename
If you want to rename an organization with over 10,000 total sites or want to have greater control over the rename operation, you must use Advanced Tenant Rename. It supports changing the SharePoint domain on tenants with up to 500,000 total sites currently and has the ability for admins to prioritize up to 4,000 sites in their organization for early execution within the overall rename. This allows for select business-critical or high-visibility sites to complete first and reduce any risk or concerns with its impact on daily operations.
Advanced Tenant Rename is a part of SharePoint Advanced Management.
Prerequisites
Advanced Tenant Rename can currently only support tenants meeting the following conditions:
- You must have SharePoint Advanced Management licenses purchased for all users in your organization.
- Your organization has <500,000 total sites.
- Your organization doesn’t have Microsoft 365 Multi Geo enabled.
- Your organization doesn’t use government clouds, including GCC, GCC High and DoD.
- Your organization doesn’t use vanity domains (from the earlier MTE offering).
Step 1: Add the new domain name
- Check the availability of the new domain you want. For example, if you want your SharePoint and OneDrive URLs to begin with
fabrikam.sharepoint.com, enterhttps://fabrikam.sharepoint.comin a browser. If you get a message that the address couldn’t be found (404), it’s probably available. If you get a sign-in screen or a message that your username couldn’t be found in the fabrikam.sharepoint.com directory, then the domain is taken and you need to try a different one. If the domain is already registered by another customer, we can’t provide any information or contact the customer. - If you own the domain for another subscription, you need to delete that tenant in Microsoft Entra ID. Deleting a tenant typically takes three days to complete and to make the domain available.
Warning
Do NOT use the domain to test this procedure in a test environment first. If you do, you won’t be able to use the domain for your production environment.
- Add your new .onmicrosoft.com domain using the Domains page in the M365 Admin Center.
- Don’t use the “Add domain” option directly present in the Domains page, since that doesn’t create a .onmicrosoft.com domain. Use the steps in the link above to correctly create one.
- Don’t make this domain your fallback domain.
- Go back to the Domains page and check that the newly added .onmicrosoft.com domain appears in a ‘Healthy’ state.
Step 2: Use Microsoft PowerShell to rename your domain
Warning:When the change of the SharePoint domain starts, sites that remain on the original domain are temporarily inaccessible. As each site gets renamed to the new domain, it becomes accessible again.Changing your SharePoint domain name might take several hours to days depending on the number of sites and OneDrive users that you have. We strongly recommend that you make this change during a period of low usage (like a weekend) and tell users to avoid accessing SharePoint and OneDrive content during the change. In addition, any actions that create new OneDrives and sites (such as creating a new team or private channel in Microsoft Teams) are temporarily blocked during the rename.Don’t plan any UPN changes or renames while the update of your SharePoint domain name is in progress. If you need to perform any, please do so after the domain name change is complete.
REQUIRED – Download the latest SharePoint Online Management Shell. If you installed a previous version of the SharePoint Online Management Shell, go to Add or remove programs and uninstall “SharePoint Online Management Shell”. Make sure you review the System Requirements and Install Instructions. The app isn’t supported on Mac.
https://www.microsoft.com/en-us/download/details.aspx?id=35588
Connect to SharePoint as at least a SharePoint Administrator in Microsoft 365. To learn how, see Getting started with SharePoint Online Management Shell.
Example:
Connect-SPOService -Url "https://contoso-admin.sharepoint.com"
Run the following command to specify the new domain name:
Start-SPOTenantRename -DomainName <DomainName> -ScheduledDateTime <YYYY-MM-DDTHH:MM:SS> [-WhatIf] [-Confirm]
Where “DomainName” is the part before “sharepoint.com” or “onmicrosoft.com” and “ScheduledDateTime” is at least 24 hours in the future, but not more than 30 days. The time you enter is based on the current date and time of the computer you’re using.
Start-SPOTenantRename -DomainName “fabrikam” -ScheduledDateTime “2021-12-31T10:25:00”

Step 3: Review features and settings after the rename
- Review any firewall rules that might block access to the new domain.
- Review organization browser settings to make sure the new domain is a trusted location. This includes reviewing any Group Policy settings that might control browser settings.
- Review any third-party apps, custom apps, and scripts that access SharePoint. They might need to be modified to use the new domain.
- If you have custom SharePoint Framework solutions that require access to an API, check the API access page in the SharePoint admin center to ensure that the new domain name can be used by SharePoint Framework components.
