diff --git a/Microsoft.SystemForCrossDomainIdentityManagement/Protocol/Core2EnterpriseUserExtensions.cs b/Microsoft.SystemForCrossDomainIdentityManagement/Protocol/Core2EnterpriseUserExtensions.cs index 69cdaab5..ae9087e0 100644 --- a/Microsoft.SystemForCrossDomainIdentityManagement/Protocol/Core2EnterpriseUserExtensions.cs +++ b/Microsoft.SystemForCrossDomainIdentityManagement/Protocol/Core2EnterpriseUserExtensions.cs @@ -813,6 +813,27 @@ private static void PatchName(this Core2EnterpriseUser user, PatchOperation2 ope name.FamilyName = value; } + if + ( + string.Equals( + Microsoft.SCIM.AttributeNames.Formatted, + operation.Path.ValuePath.AttributePath, + StringComparison.OrdinalIgnoreCase) + ) + { + value = operation.Value?.Single().Value; + if + ( + value != null + && OperationName.Remove == operation.Name + && string.Equals(value, name.Formatted, StringComparison.OrdinalIgnoreCase) + ) + { + value = null; + } + name.Formatted = value; + } + if (string.IsNullOrWhiteSpace(name.FamilyName) && string.IsNullOrWhiteSpace(name.GivenName)) { if (nameExisting != null)