I'm having some issues with getting the currently signed-in user's username from Azure b2c to my Blazor web app. Essentially, I want to make a username account where a username is the User Principal Name. I was originally using an email sign-up policy with a display name as the username. However, b2c doesn't enforce display names to be unique, so there's an inherent issue with that. No claim comes back with a username in it, so I have no way in my Blazor app to keep tabs on who is signed in or display their username. There are a few options I can do, and I'm curious which one is the easiest to implement/how to implement it, cause I've been ripping my hair out with this the past few hours.
- On b2c account creation, take User Principal Name and also make it the display name
- Have the user principal name be sent via claims (Not sure how to do this)
- Do Email sign up with Display Names, but somehow enforce b2c to ensure display names are unique
- Some other way to have a unique display name for users from b2c
Thanks in advance!


