Symptoms
Office 365 synchronization fails:
ERROR: insert or update on table "Users" violates foreign key constraint "Users_CountryID" DETAIL: Key (CountryID)=(un) is not present in table "Country".
Cause
Software-related issue #APSA-18910.
Resolution
Software-related issue #APSA-18910 has been fixed in Office 365 17.1.2 application package version. Please consider the upgrade.
Workaround:
- Navigate to
[Microsoft Online Portal](https://portal.office.com) > Admin Center > Users
; - Set the empty
country code
value; - Repeat the synchronization in Customer CP.