In Azure Mobile App server, with client initiated authentication on device, we get userid (aka sid), now when I want to create a user record using mobile app service the sid is not available for the first time. Only information I have at the backend is, by reading claims with "NameIdentifier".
string uniqueId = creds.UserClaims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.NameIdentifier))?.Value;
SO I am curious whether is this the right way to get user id?