Symptoms

Office 365 synchronization fails:

{ "code": 500, "message": "Error: '_.Name.ToLowerInvariant()' cannot be converted to SQL.", "additionalNonlocalizableMessage": "" }

sitelog error:

DEBUG sync        : Save the actual license assignment for the users...
ERROR flow        : Unable to prepare data for customer e29f28b7-...-f19f6aae7ee3
LinqToDB.Linq.LinqException: '_.Name.ToLowerInvariant()' cannot be converted to SQL.
at LinqToDB.Linq.Builder.ExpressionBuilder.ConvertToSql(IBuildContext context, Expression expression, Boolean unwrap)
at LinqToDB.Linq.Builder.ExpressionBuilder.ConvertExpressions(IBuildContext context, Expression expression, ConvertFlags queryConvertFlag)

Cause

Software-related issue #APSA-19496: "Office 365 synchronization fails: LinqToDB.Linq.LinqException: '_.Name.ToLowerInvariant()' cannot be converted to SQL".

Resolution

The issue is permanently fixed in the Office 365 17.3.1 APS package. It is recommended to update your Office 365 APS application to the latest version.

Internal content

Link on internal Article