. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to fix error code `DuplicateTargetEntries`?
I am trying to integrate my own app with the user provisioning features of AzureAD,
and having trouble with the error DuplicateTargetEntries
when provisioning Groups
.
I understand that the error is due to the duplication occurring.
However, since I was asked for the same resource twice, I only responded to the same resource twice, so it is not considered a duplicate.
The requests and responses that are treated as DuplicateTargetEntries
are below.
Request from AzureAD
GET /Groups/8c60f8b2-d90b-422c-83df-ff1ec8070de7?excludedAttributes=members
Response from MyApp
{
"display": "test-group",
"id": "8c60f8b2-d90b-422c-83df-ff1ec8070de7",
"meta": {
"resourceType": "Group",
"location": "Groups/8c60f8b2-d90b-422c-83df-ff1ec8070de7"
},
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}
Request from AzureAD
GET /Groups?excludedAttributes=members&filter=displayName+eq+%22test-group%22
Response from MyApp
{
"Resources": [
{
"displayName": "test-group",
"id": "8c60f8b2-d90b-422c-83df-ff1ec8070de7",
"meta": {
"resourceType": "Group",
"created": "2020-11-24T02:05:42Z",
"lastModified": "2020-11-24T02:05:42Z",
"location": "Groups/8c60f8b2-d90b-422c-83df-ff1ec8070de7"
},
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}
],
"itemsPerPage": 100,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"startIndex": 1,
"totalResults": 1
}
Result of provisioning logs
Duplicate entries exist in the target. Exactly one entry was expected, but the number found was 2. Those entries matched on these identifiers: 8c60f8b2-d90b-422c-83df-ff1ec8070de7 8c60f8b2-d90b-422c-83df-ff1ec8070de7.
I don't understand why these response results as DuplicateTargetEntries
.
Of course, I've already checked some documents.
Any advice would be appreciated.