Adding an Active Directory (AD) domain - Domains and Trusts

To use a domain and make it known to the local on-premises Active Directory, follow these instructions.
These steps are often needed to prepare for a migration to Office 365 or Microsoft 365. By adding a domain you can set the UserPrincipalnames you need for authentication in Microsoft 365.
Once the domain is added, it can be used both on-premises and in the Cloud in the same 'way' we can say.
Connect to a domain controller
- Open the "Active Directory Domains and Trusts".

2. Open the properties of Active Directory domains and trusts.
3. Right-click on the top item in the left-hand tree structure and select Properties.

4. Add the desired domain to domains and trusts.

Result

2 domains were added. These can now be used in Active Directory. As UserPrincipalName on the user objects.
Example application
In the case of a user creation, the added domain can be used as a UPN.
It is recommended that all UPNs be adapted when migrating to Microsoft 365. Before Azure AD connect will be deployed.

See also
Add a new domain to Microsoft 365 - Admin Center
Userprincipalname Customise with PowerShell in Microsoft 365
Microsoft Teams Administrator Center - Microsoft 365
Your own Office 365 environment for 4,20€ per month
Add multiple users to a Team at the same time