How do I get an OID claim in ASPCore from Azure B2C

Well, this is embarrassing, I must have looked over this line about 30 times and not noticed...

I was retrieving the OID token, it's claim type was:

http://schemas.microsoft.com/identity/claims/objectidentifier

As can be clearly seen in my provided screenshots. I'll leave this question up as, the schema may throw someone else off.


I struggled with this for a little while and this post helped me.

To update things with some code, the below will obtain the object identifier value (unique user id in Azure)

User.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value

Thanks for pointing out the differences in the schema/types!