Problem/Motivation
Some people will get the following message while trying to log in even if the account exists in Drupal:
"You do not have an account on this site. Please contact a administrator."
There's a bug with the o365 module where it doesn't ignore cases, for example in Azure AD, an email would look like this (first letter uppercase): Firstname.Lastname@domain.com but in Drupal, the email is firstname.lastname@domain.com (all lowercase) and the account wouldn't match so the person would get the error.
To fix the issue, we need to log in to Azure AD and check if the email of the user has some capital letters, then go back to Drupal and update the email to match the case.
Steps to reproduce
Simply create an account in Drupal with lower case/upper case that does not match the Azure AD account and try to log in.
Proposed resolution
Update the o365 module to ignore cases for email addresses.
Comments
Comment #2
batigolixComment #3
fabianderijkComment #5
fabianderijkI've created a fix for this issue. We now pass all e-mail addresses through the lowercase function so we only check, or add lowercase e-mail addresses.
This is now in the dev release and will be in the upcoming tagged release.