Change SharePoint domain.

I need to change the SharePoint domain. I am using PowerShell with the following commands Start-SPOTenantRename -DomainName "contoso" -ScheduledDateTime "2024-06-29T10:00:00"

But it gives the following error: 

Start-SPOTenantRename : Error Code: -757,The domain name is not valid.
In line:1 character:1
+ Start-SPOTenantRename -DomainName "contoso" -ScheduledDateTime "2024- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Start-SPOTenantRename], Exception
    + FullyQualifiedErrorId : Error Code: -757,The domain name is not valid.,Microsoft.Online.SharePoint.PowerShell.

Does anyone have an idea what it could be?

I'm using the contoso domain just as an example
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,236 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 15,320 Reputation points Microsoft Vendor

    Hi @Gabriel Gomes Duarte | ASL Tecnologia,

    Thank you for posting in this community.

    There could be two reasons for your 757 error:

    1. The domain name isn't in the list of verified domains for the tenant. Add a verified domain and start a renaming by using the domain.

    2.Your domain name is already in use. Try changing your domain name.

    For example, if the new domain name of your SPO is the same as your Exchange Online, this can lead to this problem. If you want to keep your Exchange Online domain name consistent with SPO's, both of them will have to be modified to another new domain name.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.