In our Azure B2C we let users to sign up using mixed-case emails as their logins (IssuerAssignedId). Now we have a lot of users (not all but many) with IssuerAssignedId like Name.Surname@domain.com.
In our API we have endpoints that perform business validation of the user by given email, and API clients provide these emails in all lowercase. So Graph API call fails to find user when email is given like name.surname@domain.com if actually registered B2C IssuerAssignedId is Name.Surname@domain.com.
We use standard filter syntax:
await _graphServiceClient.Users
.Request()
.Filter($"identities/any(c: c/issuerAssignedId eq '{email}' and c/issuer eq '{issuer}')")
.Select(e => new { e.DisplayName, e.Id, e.Identities})
.GetAsync();
The problem is that filter query does not allow to use tolower() odata function like
$"identities/any(c: tolower(c/issuerAssignedId) eq '{email}' and c/issuer eq '{issuer}')"
so I'm unable to normalize the email from lambda argument. As I understand, odata for Graph B2C has some limitations comparing to standard.
What can be the approach to resolve such issue?