Microsoft azure AD user created with no email

Hey Sid

Yes, I have set the email.

And now it is working, the problem was with my testing user’s configuration.

My problem now is to set the email if it is missing, so I tried with this code in a rule:

function (user, context, callback) {
  if (!user.email && user.upn) {
    user.email = user.upn;
  }

  callback(null, user, context);
}

But the email is still not set when I look at the user’s page.
Only difference this makes is by adding the email to the "Last time you sign with:"


Without my code above it show instead AZURETEST (the name).

How do I affectively set the email?