Thank you for reaching us!
For your query, I understand that you are facing an issue while make custom as a primary domain.
In Microsoft Entra ID (Azure AD), the primary domain is the default domain name for a new user when you create a new user. When your organization is created, the initial domain name, such as org.onmicrosoft.com,’ is also the primary domain name. This default domain is managed by Microsoft Entra ID and uses Microsoft Entra ID for authentication.
A Federated domain in Microsoft Entra ID is a domain that is configured to use federation process, such as Active Directory Federation Services (AD FS), to authenticate users. All federated users must be created on-premises and must be synced by using the Microsoft Azure Active Directory Sync Tool.
Hence a federated domain cannot be set as the primary domain in Azure Active Directory. The primary domain can only be a managed domain. If you wish to set a federated domain as the primary one, you will first need to convert it to a managed domain However this procedure may have an effect on the users and services linked to the domain.
I hope this answer helps! If you have any further questions, please feel free to ask.
Reference: https://learn.microsoft.com/en-us/entra/identity/users/domains-manage
Thanks,
Akhilesh.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.