The user profile has no
This issue could be due to the Email property missing for the user in the Azure Active Directory. In some tenants, only the UPN is configured.
Please check in Azure Portal if the user has an Email property.
If yes, please go to Azure AD > App registrations > select an Application > Token configuration and enable UPN and Email claims for the ID token.
Alternatively, you can add something like this in a Rule to map UPN as Email:
user.email = user.email || user.upn;