Request for LDAP Functionality
Expected Behavior (or desired behavior if a feature request)
Feature Request:
Is there a way to have Snipe-IT import location from Active Directory when doing LDAP Import? It would be great if you could have a selection of which items you want to import from Active Directory.
Fields like Location, Phone Number, Department, Title, are nice to have. I am going to put out there to have a selection check box that you can check to activate that item in the LDAP Import. If the box is not selected, the item is not imported or imported as a common item.
Actual Behavior
You are required to import all users to a single location
Please confirm you have done the following before posting your bug report:
- [X] I have enabled debug mode
- [X] I have read checked the Common Issues page
Please provide answers to these questions before posting your bug report:
System Information Snipe-IT version v3.6.4 build 12 (gf7e4fca) PHP Version 5.6.28 Laravel Version 5.2.45 Windows Server 2012R2 XAMPP Apache Web Server with MYSQL.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
👍
+1
it would also be great to import "manager" field it's especially important when manager has huge team.. it would greatly lessen manual work in Snipe
@rozowykubek so the reason we haven't implemented manager import is because LDAP imports, depending on size, can be very slow and potentially memory intense. Adding managers basically doubles the amount of lifting the database has to do, while still processing all the LDAP stuff, since it has to check to see if the manager-user exists (if not, create them). What I can tell you is that in v4, we have a bulk user edit option now that lets you select lots of people and update their groups and managers, which may be a good stopgap for now.

How about location? We have a bunch of users who are hired and some people leave weekly, so in order to keep things up to date, I must import from LDAP frequently. Thus after doing so, it will modify the "Location" field back to the whatever you imported it as.
@snipe thanks for explanation ! indeed, v4 bulk user edit looks promising ;)
I would agree with @dwestonjr. In multinational companies where people's roles are constantly changing (promotions, demotions, relocations, etc.) IT will typically rely on AD/LDAP as the authoritative database of information about employees. It would be a huge plus to have as much information from the directory be synchronized down.
Hello, is there any updates regarding this request? Fields like Location, Phone Number, Department, Title synced via the LDAP Sync function would be a fantastic option. Considering the fields exist in LDAP and you can not use a CSV file to update accounts that where created via LDAP Sync you end up having to manually edit. Even with bulk update this is tedious not scalable past a few dozen people.
Hi @kennethhadley when there is an update, this thread will be updated accordingly.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!
Just adding my voice to the chorus of people who'd love to import more from LDAP
Department & Location would be a fantastic start, but really just department :)
Same as above. I don't want another database of users to maintain. If I can get Department to sync through, it would save a lot of work. Manager and Company would also be neat, but I'll take what I can get. Thanks for your efforts.
+1, plus phone if possible 😀. Thanks for all of your hard work.
+1 But i think no solution in near future)!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!
+1 to keep Department sync dream alive!
1+ would be amazing
This has the potential to be handy, but it would definitely need to be optional. Alternatively I have an idea below that should be more flexible to hopefully better match the wide variety of different users' needs. The way our AD OU is structured during an LDAP sync could break a lot of things if it started pulling from OUs and trying to match locations or departments. Simply put, our AD OU doesn't correlate with physical locations as we have Snipe organized.
Presently in the LDAP filter, we have &(objectCategory=person)(objectClass=user)(!(|(extensionAttribute2=option1)(extensionAttribute2=option2)) This allows us to control who gets imported basically, but not what we do with them after they are in.
Brainstorming:
I think it would be pretty neat if during, or at some stage, of the LDAP sync I could tick options that look for custom Attributes. Optionally, this could be done afterwards where I just target my LDAP synced users so that it doesn't over burden the process as @snipe mentioned in the Apr 7, 2017 comment. I have no idea if you're able to pull Attributes during the LDAP sync and store them Snipe-side so that you don't have to re-query LDAP to make changes. But if you can split the process (just grab attributes during LDAP sync as current process. Updating/manipulating user data in Snipe as a separate process) that would be great.
If it's a problem to pull over all AD Attributes, then maybe if you want "Advanced LDAP features" in Snipe, you have to add custom attributes like "SnipeExt1, SnipeExt2, etc." in your Active Directory and only those are duplicated from LDAP onto the Snipe-IT user database.
If I could tell Snipe-IT to say: OK everyone of my LDAP users that have X Attribute with Value Y, do the following BULK ACTION.
X= whatever I type in. (or SnipeExt1, etc.)
Y= whatever I type in.
BULK ACTION= things like move to a new location or update department information. Basically things you might do on the /users page for People.
Anyone's who SnipeExt1 = "MiddleSchoolTeacher" then, pick two options (drop down) of Snipe-IT options such as "Department" then another dropdown of existing Departments that you want to update matching users to. Spits out a report saying "75 users were updated successfully" or "0 users were updated, no attributes for SnipeExt1 had the value "MiddleSchoolTeachers"
This would let me edit users in bulk at a near-automation level, but still allowing it to be completely customized and flexible for different environments.
Another addition why OU <-> Location syncing would destroy our setup. Right now I have 184 locations (and counting) entered into Snipe-IT. We have teachers in OU by campus and students in OU by graduation year. That's what, approx. 21~ OUs vs. 184 locations?
I believe the above suggestion of mine accommodates organizations like ours that do not have a 1:1 relationship between OU and Snipe locations/departments, and people that do. You could simply have your scripts add a custom attribute value that mirrors the OU (Floor 1, QA, Accounting, etc. Whatever you have your OU and locations set to) and then follow the process above to update all users that have "Attribute1 = Floor 1" to Snipe-IT location "Floor 1".
Accomplishes the same thing, yeah?
Also another option is to just export the active directory list of users, add and modify the departments in some bulk fashion on the CSV, and import with override existing to add to departments and/or locations.
Never mind, I should have checked first. Got active directory exporting, went to test and discovered you cannot update "Departments" during the import phase. Will make a separate feature request for it.