When I first set up my Azure Active Directory tenant, Azure made me choose an initial domain name based on onmicrosoft.com, for example contosoorg.onmicrosoft.com. The help text says "By default, a basic domain name at 'onmicrosoft.com' is included with your directory. Later, you can add a domain name that your organization already uses, such as 'contoso.com'." Because of this, I didn't think the initial domain name would be a big deal. Once I set up the tenant, I configured a custom domain name, for example contoso.com. I set the primary domain name of my AAD tenant to the new custom domain name. Everything seemed to be working fine.
Then I started inviting guest users. Each one that I have invited got assigned a UPN that looks like this: john.doe_somecompany.com#EXTfirstname.lastname@example.org. Note that AAD is still embedding the initial domain name in the UPN instead of the primary domain name.
This is not causing any problems with functionality, but the oddball domain name has been noticed and I've been asked whether we can change this. Now would be the time to do it since we are just testing and have not rolled out the tenant to actual users. Anyone know if there is a way to change the domain name that AAD uses to generate UPNs?