We are currently facing limitations with the iTop LDAP user import routine regarding the synchronization of the Location field, as noted in the official documentation (https://www.itophub.io/wiki/page?id=3_1_0:advancedtopics:data_synchro_overview).
Our requirement is to successfully integrate the user's location data from Active Directory. We need the user's Location field in iTop to be populated, or alternatively, we need the Organization field to be selected based on the user's location attribute from AD.
We are using the ldap-data-collector extension (https://www.itophub.io/wiki/page?id=extensions%3Aldap-data-collector) and have identified that the AD attribute physicalDeliveryOfficeName contains the data we need.
We are looking for guidance on how to properly implement this change ourselves. We have found the following documentation regarding the steps, but we are unsure if this is the correct procedure and how to handle all the details.
Is the XML mapping shown above the correct way to map physicalDeliveryOfficeName to an iTop field named office?
Creating the Field: The documentation mentions creating the office field in iTop (on the Person object) if it doesn't already exist. What is the correct procedure to do this? What field type should we use? Will the data collector automatically recognize this new field after it's created, or is another step needed?
Setting Organization based on Location: Our alternative goal is to use this location data to set the user's Organization. Is it possible to add logic to the collector (e.g., "IF physicalDeliveryOfficeName = 'Location A' THEN set Organization = 'Organization A'")? If so, how would we configure that within the collector's XML?
Could you please review these proposed steps and provide guidance on our questions? We want to ensure we implement this correctly without disrupting our current user synchronization.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could use an "AttributeString" field for this (then it will purely fill in the string) or you could use an "AttributeExternalKey" pointing to some class (then it needs to look up an ID).
There's some really good documentation by Combodo on how to add fields. And some official examples; but there's a lot more in this repository too on how to accomplish certain things.
For the alternative approach - you'd need to modify the collector (but that's going to be annoying in the long run if Combodo's LDAP collector gets updated); or you could have one collector XML configuration per organization and adjust the LDAP filter.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are currently facing limitations with the iTop LDAP user import routine regarding the synchronization of the Location field, as noted in the official documentation (https://www.itophub.io/wiki/page?id=3_1_0:advancedtopics:data_synchro_overview).
Our requirement is to successfully integrate the user's location data from Active Directory. We need the user's Location field in iTop to be populated, or alternatively, we need the Organization field to be selected based on the user's location attribute from AD.
We are using the ldap-data-collector extension (https://www.itophub.io/wiki/page?id=extensions%3Aldap-data-collector) and have identified that the AD attribute physicalDeliveryOfficeName contains the data we need.
We are looking for guidance on how to properly implement this change ourselves. We have found the following documentation regarding the steps, but we are unsure if this is the correct procedure and how to handle all the details.
Proposed Steps (based on our research):
Locate Configuration File: collectors/params.local.xml
Edit Field Mapping: Add physicalDeliveryOfficeName to the <person_fields> section. Example:</person_fields>
XML
<person_fields>
<office>physicalDeliveryOfficeName</office>
</person_fields>
Verify User Sync: Ensure <user_fields> is correct. Example:</user_fields>
XML
<user_fields>
<login>samaccountname</login>
</user_fields>
Our Questions:
Is the XML mapping shown above the correct way to map physicalDeliveryOfficeName to an iTop field named office?
Creating the Field: The documentation mentions creating the office field in iTop (on the Person object) if it doesn't already exist. What is the correct procedure to do this? What field type should we use? Will the data collector automatically recognize this new field after it's created, or is another step needed?
Setting Organization based on Location: Our alternative goal is to use this location data to set the user's Organization. Is it possible to add logic to the collector (e.g., "IF physicalDeliveryOfficeName = 'Location A' THEN set Organization = 'Organization A'")? If so, how would we configure that within the collector's XML?
Could you please review these proposed steps and provide guidance on our questions? We want to ensure we implement this correctly without disrupting our current user synchronization.
You could use an "AttributeString" field for this (then it will purely fill in the string) or you could use an "AttributeExternalKey" pointing to some class (then it needs to look up an ID).
There's some really good documentation by Combodo on how to add fields. And some official examples; but there's a lot more in this repository too on how to accomplish certain things.
Most useful resources are:
https://www.itophub.io/wiki/page?id=latest:customization:xml_reference
https://www.itophub.io/wiki/page?id=latest:customization:datamodel#content_of_a_module
https://www.itophub.io/wiki/page?id=latest:customization:portal_xml
For the alternative approach - you'd need to modify the collector (but that's going to be annoying in the long run if Combodo's LDAP collector gets updated); or you could have one collector XML configuration per organization and adjust the LDAP filter.