In some implementations, the email field isn't returned from the authentication server. In those cases, make something up that will probably be just as stable as the users' email address.
In our current setup, we actually only receive the sub (Microsoft ID), name and preferred_username fields as general usable data for identifying a user. In our Django app, we actually identify the accounts using the Microsoft ID, but we see the need for an e-mail address to create the user.
In some implementations, the
email
field isn't returned from the authentication server. In those cases, make something up that will probably be just as stable as the users' email address.In our current setup, we actually only receive the
sub
(Microsoft ID),name
andpreferred_username
fields as general usable data for identifying a user. In our Django app, we actually identify the accounts using the Microsoft ID, but we see the need for an e-mail address to create the user.