
SmitaBB.12515 (Customer) asked a question.
Issue - Provisioning Import Users failing with unique constraint error
Hi Team,
There is custom SCIM app.
While importing the users manually, there is a unique constraint 'null' error.
Managed to populate all required details in the app response profile.
However, it is failing always.
Any help/suggestion would help. Thank you in advance!
Below is the excerpt from the Import Logs.
"displayMessage": "Import process complete",
"eventType": "system.import.complete",
"outcome": {
"result": "FAILURE",
"reason": "import job failed"
},
"published": "2026-10-13T06:50:32.244Z",
"securityContext": {
"asNumber": null,
"asOrg": null,
"isp": null,
"domain": null,
"isProxy": null
},
"severity": "ERROR",
"debugContext": {
"debugData": {
"jobId": "ij118nk9m3sVbdvGS698",
"appname": "trial-9114921_scimbsso_1",
"message": "SQLIntegrityConstraintViolationException: Column 'ancestor' cannot be null"

Hello @SmitaBB.12515 (Customer) Thank you for posting on our Community page!
You are asking why the manual user import for your custom SCIM app fails every time with a unique constraint error on a null value, even after the required profile details were populated.
The import usually fails when the unique identifier or userName value returned by your SCIM endpoint is null or duplicated for one or more users, so the fix is to verify those values in both the endpoint response and the app configuration.
Root Cause: Okta's import job requires a non-null, unique value in the field set as the unique identifier for users, and the username must map to a populated value. A null or duplicate value in any imported record causes the import job to fail.
Solution: Follow these steps:
Thank you for reaching out to our Community and have a great day!
--
Help others in the community by liking or hitting Select as Best if this response helped you.
Hi @Paul S. (Okta, Inc.) ,
Thank you so much for your response.
Yes, I had already ensured to populate the userName and also email in the app responses.
Further, when I disable the Groups endpoint and retain only users, it works well.
However, with Groups I see this issue.
Could you please help.
Providing you more details below.
Get ALL /Users response:
---------------------------------------- Users - Start ----------------------------------------
{
"schemas" : [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults" : 1,
"startIndex" : 1,
"itemsPerPage" : 3,
"Resources" : [
{
"id" : "Sample_123",
"userName" : "09_1_oct_new_test@sample.com",
"displayName" : "oct_new",
"active" : true,
"emails" : [
{
"value" : "09_1_oct_new_test@sample.com",
"type" : "work",
"primary" : true,
"display" : "09_1_oct_new_test@sample.com"
}
],
"groups" : [ ],
"name" : {
"familyName" : "test",
"givenName" : "oct_new"
},
"schemas" : [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"externalId" : "okta234"
},
{
"id" : "sample_234",
"userName" : "02_09_oct_new_test@sample.com",
"displayName" : "Oct",
"active" : true,
"emails" : [
{
"value" : "02_09_oct_new_test@sample.com",
"type" : "work",
"primary" : true,
"display" : "02_09_oct_new_test@sample.com"
}
],
"groups" : [ ],
"name" : {
"familyName" : "New2",
"givenName" : "Oct"
},
"schemas" : [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"externalId" : "okta234"
},
{
"id" : "sample_234",
"userName" : "03_09_oct_new_test@sample.com",
"displayName" : "Oct",
"active" : true,
"emails" : [
{
"value" : "03_09_oct_new_test@sample.com",
"type" : "work",
"primary" : true,
"display" : "03_09_oct_new_test@sample.com"
}
],
"groups" : [ ],
"name" : {
"familyName" : "3new",
"givenName" : "Oct"
},
"schemas" : [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"externalId" : "okta_123"
}
]
}
Note: id and externalId fields are not the actual values, I have given sample values here
---------------------------------------- Users - End ----------------------------------------
Get ALL /Groups response:
---------------------------------------- Groups Start ----------------------------------------
{
"schemas" : [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults" : 32,
"startIndex" : 1,
"itemsPerPage" : 32,
"Resources" : [
{
"id" : "f720d065-4ec4-4b0d-8648-7445614177f8",
"meta" : {
"created" : "20261013 065031.362",
"lastModified" : "20261013 065031.362",
"resourceType" : "Group",
"location" : "en-US"
},
"displayName" : "Boomi - Event Notifications - Administrator",
"schemas" : [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}
]
}
--------------------------------------- Groups - End ----------------------------------------
Hello @SmitaBB.12515 (Customer) I would recommend to open a case with Support for addinional investigation on this matter.
HI Paul,
I did try creating a case. I am not able to create a case with my account.
Any assistance would be helpful
Hello @SmitaBB.12515 (Customer)
The Groups import fails because the SCIM responses you shared contain duplicate identifiers, a Groups list that does not match its reported totals, and group records without the membership data Okta needs to build group relationships.
Root Cause: Four issues appear in the responses:
Solution: Follow these steps: