My domain is verified but I still get: ERROR: The domain portion of the userPrincipalName property is invalid. You must use one of the verified domain names in your organization.

Robin Bosshard 0 Reputation points
2024-01-16T17:57:58.1466667+00:00

export AKS_ADMIN_OBJECTID=$(az ad user create --display-name=dronedelivery-admin --user-principal-name dronedelivery-admin@${K8S_RBAC_ENTRA_TENANT_DOMAIN_NAME} --force-change-password-next-sign-in --password ChangeMeDroneDeliveryAdminChangeMe! --query id -o tsv)

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2024-01-17T20:00:16.5166667+00:00

    Hi @Robin Bosshard , this indicates that the domain name you are using in the user principal name is not one of the verified domain names in your organization. Please make sure that you are using one of the verified domain names in your organization. You can check the list of verified domain names in the Azure portal by going to Azure Active Directory > Custom domain names. If you have already verified the domain name and it is still not working, please make sure that you have waited for the DNS changes to propagate. It can take up to 72 hours for the DNS changes to take effect. Also, please make sure that you have entered the correct domain name in the command. You can verify the domain name by running the following command:

    echo ${K8S_RBAC_ENTRA_TENANT_DOMAIN_NAME}
    

    If the domain name is correct and verified, and you are still getting the error, please provide more information about your setup and the steps you have taken so far, so that I can assist you better. Please let me know if you have any questions and I can help you further. If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James


  2. linda burns 1 Reputation point
    2024-09-02T01:51:34.3333333+00:00

    I get the same thing, and my domain is verified, and registered. I don't get it. I've installed MS Graph. Login pops up and I log into my domain. Has anyone found a solution.

    New-MgUser_CreateExpanded: The domain portion of the userPrincipalName property is invalid. You must use one of the verified domain names in your organization.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.