Hi Martin,
Unfortunately, you cannot rename your hole Azure/Entra ID tenant.
You can create a new .onmicrosoft.com domain with your desired name (if the name is available and not already taken by someone else) and then change that to be your "default" .onmicrosoft.com domain for new users if not useing custom domain.
The "original" .onmicrosoft.com is created when all in the tenant is created, like an on-prem Active Directory - and that can´t be changed to, as a lot of information in the database and so is related on that.
Add a .onmicrosoft.com domain
For this purpose, you need Global Administrator directory role and perform below steps:
- In the Microsoft 365 admin center, select Settings, and then select Domains.
- Select an existing .onmicrosoft.com domain.
- On the Overview tab, select Add onmicrosoft.com domain.
- On the Add onmicrosoft domain page, in the Domain name box, enter the name for your new onmicrosoft.com domain. Note Make sure to verify the spelling and accuracy of the domain name you entered. You are limited to five onmicrosoft.com domains, and currently they cannot be deleted once they are created.
- Select Add domain.
Change default .onmicrosoft.com domain
For this purpose, you need Global Administrator directory role and perform below steps:
- In the Microsoft 365 admin center, select Settings, and then select Domains.
- Select an existing .onmicrosoft.com domain with the check mark
- Select the Set as default on the top menu
Let me hear if this helps.