AHD03116 - Tenant Violation involving department

Document ID : KB000105924
Last Modified Date : 10/07/2018
Show Technical Document Details
Issue:
When I ran pdm_ldap_import I got the error AHD03116, we have two tenants ("T1" AND "T2"). Some departments exists in both tenant.
The import is trying insert the department from tenant "T2" in a contact of "T1".

Steps to reproduce: 

1. In SDM, create 2 Tenants: T1 and T2 
2. Create 2 departments with the same name, i.e.: Support 
3. Set the first one to T1 and the second one in T2 
4. In AD, create under the Domain, 2 Organizational Units T1 and T2 
5. create 2 different users: UserT1 in OU T1 and UserT2 in OU T2. also, set for both Users, the Departament : "Support" 
6.Iin SDM server, run pdm_perl pdm_ldap_config.pl and add 2 LDAPs for T1 and T2, configuring the parameters and setting to the new tenants 

7. After configuring properly all environment, now try to import both Users from the new OUs: 
8. Run the pdm_ldap_import -n "T1" (it will import the UserT1 inside tenant T1 and Department Support) 
### Results: 
C:\Windows\system32>pdm_ldap_import -n "T1" 
pdm_ldap_sync: Starting... 
pdm_ldap_import: LDAP where clause = "ldap_domain = 'T1' AND userid='%'" 
pdm_ldap_import: Contact where clause = "ldap_dn = ?" 
pdm_ldap_import: Summary: Processed(1) Imported(1) Updated(0) No Matches(0) No C 
hanges(0) Multiple Matches(0) No Lookups(0) Errors(0) 
pdm_ldap_import: Complete... 


9. Run the pdm_ldap_import -n "T2" (it will import the UserT2 inside tenant T2 and Department Support) 
### Results: 
At this time, the error will occur: 
C:\Windows\system32>pdm_ldap_import -n "T2" 
pdm_ldap_sync: Starting... 
pdm_ldap_import: LDAP where clause = "ldap_domain = 'T2' AND userid='%'" 
pdm_ldap_import: Contact where clause = "ldap_dn = ?" 
pdm_ldap_import: dept not set in cnt:7A308CF2CAC29D4787855DE20C583920 (AHD03116: 
Tenancy violation in Contact UserT2, UserT2 belonging to tenant t2 - attribute 
Department references Department Support belonging to tenant t1) 
pdm_ldap_import: Error updating Contact cnt:7A308CF2CAC29D4787855DE20C583920 (AH 
D03116:Tenancy violation in Contact cnt:7A308CF2CAC29D4787855DE20C583920 belongi 
ng to tenant t2 - attribute Department references dept Support belonging to tena 
nt t1) 
pdm_ldap_import: Summary: Processed(1) Imported(0) Updated(0) No Matches(0) No C 
hanges(0) Multiple Matches(0) No Lookups(0) Errors(2) 
pdm_ldap_import: Complete... 

This seems to be a bug, since he should import the UserT2 to SDM. 
Environment:
Ca Service Desk Manager 14.1.x / 17.1
Cause:
This issue is caused by: DE39867
Resolution:
This defect DE39867 has been fixed.
It will be part of 14.1 CUM5 RU1 and ported to 17.1 RU2 and 17.2 releases.