Azure B2C user creation is failed for some specific user

Sengol Raj, Stephen 0 Reputation points
2024-05-15T04:47:03.5066667+00:00

I am creating a user in Azure B2C using Graph Client (5.40.0). While creating the user, we are getting response saying that "userPrincipalName already exists". Then we try to get the user using the user's principal name, we are getting error code "Request_ResourceNotFound". So, we are unable to create this specific user.

This happens only for some User. I have added the user data below.

User Data:

User principal: nyah.kingoakviewgroup.com@agilysysprod.onmicrosoft.com

Tenant : agilysysprod.onmicrosoft.com

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,686 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Navya 4,860 Reputation points Microsoft Vendor
    2024-05-17T06:23:38.2033333+00:00

    Hi @Sengol Raj, Stephen

    Thank you for posting this in Microsoft Q&A.

    I understand that you are trying to create a user in Azure B2C using Graph Client (5.40.0), but you are getting a response saying that "userPrincipalName already exists". When you try to get the user using the user's principal name, you are getting an error code "Request_ResourceNotFound".

    Could you attempt to retrieve the user by utilizing their object ID and observe the outcome?

    Please follow the document https://learn.microsoft.com/en-us/graph/api/user-post-users?view=graph-rest-1.0&tabs=csharp#example-1-create-a-user to create user using graph client.

    For your reference: User management in B2C

    If you are still encountering issue, please share the Graph Client request that you use to create a user and obtain their information?

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    0 comments No comments