Is there a way to have guest account without # sign, in user id?

Rizwan Assad 341 Reputation points
2023-12-18T09:59:10.11+00:00

During self-service signup the account gets created with a # sign, in their user IDs which cannot be synced to apps due to special character limitation, is there a way to remove the # sign automatically during signup?

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

Answer accepted by question author
  1. Marilee Turscak-MSFT 37,276 Reputation points Microsoft Employee Moderator
    2023-12-19T01:14:15.91+00:00

    Hi @RSahi ,

    There isn't currently a way to remove the # sign. The “#” is a reserved character in UPNs for Microsoft Entra B2B collaboration or external users, because the invited account ******@contoso.com becomes user_contoso.com#EXT#@fabrikam.onmicrosoft.com. The guest user principal name contains the #EXT# identifier.

    https://learn.microsoft.com/en-us/entra/external-id/troubleshoot#how-does--which-isnt-normally-a-valid-character-sync-with-azure-ad

    https://learn.microsoft.com/en-us/entra/external-id/what-is-b2b

    Note that UPN is not the value that links on-premises and cloud objects. That role is played by the sourceanchor (objectGUID by default). There are some workarounds mentioned in this thread that may suit your scenario, depending on where you are synchronizing the users. For example, you could use automatic user registration or import the members from a file.

    As a sidenote, if you just need to query a B2B user using the userPrincipalName, you can encode the hash (#) character by replacing the # symbol with %23.

    If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar questions. Otherwise let me know if you have further questions.


0 additional answers

Sort by: Most helpful

Your answer

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