Azure user provisioning error - INSERT INTO sys_user Duplicate entry key Issue Customer reported every time when they run their Azure user provisioning process will end with below error in system log, although could only found one "INSERT INTO sys_user" in the Database BIN log. ------------------------------------- FAILED TRYING TO EXECUTE ON CONNECTION glide.8 (connpid=3721007): INSERT INTO sys_user (`/データベースで一意キー違反が検出されました ((conn=3721007) Duplicate entry '2e6264681b16b1502b156beb234bcb01' for key 'PRIMARY'): java.sql.SQLIntegrityConstraintViolationException: (conn=3721007) Duplicate entry '2e6264681b16b1502b156beb234bcb01' for key 'PRIMARY': ------------------------------------- This article will help to how to identify one possible reason and workarround if this happened in Servicenow instance. Release All available releases. Cause This is caused by a customer businsse rule which having current.update(), when trigger by Insert into sys_user table. It will re-do all the DB actions within same transaction. We can't find the SQL for the 2nd INSERT in the BIN log because the BIN log only records effective SQL statements. The 2nd INSERT hit the duplicate-key violation and then was rejected by the DB, therefore, it was not recorded in the BIN log. Resolution Disable the Business rule or remove current.update() would solve this issue. The following steps would help to found the business rule. 1. List all Business rule triggered with sys_user and check if any script contains "current.update" 2. if have transaction id from Bin log then a) Converting the txid "e66264681b16b1502b156beb234bcb01" into Utah:gs.info(GlideGuid.generateShorterTxid("e66264681b16b1502b156beb234bcb01"));*** Script: e66264680142 b) Search in Splunk may found the rule name as the sample log below"sourcetype=appnode_localhost_log instance=instance_name txid="e66264680142" | sort _time" SOAPProcessorThread6a6224681b16b1502b156beb234bcbf5 AE6224281B16B1502B156BEB234BCB10 txid=e66264680142 Recursive business rule call for 'XXXXXBusiness Rule name XXXXX' on sys_user: