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:

  1. Navigate to [Microsoft Online Portal](https://portal.office.com) > Admin Center > Users;
  2. Set the empty country code value;
  3. Repeat the synchronization in Customer CP.

Internal content