snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.88k stars 3.14k forks source link

E-Mail ID from Ldap is not syncing #1597

Closed hegdemaahi24 closed 8 years ago

hegdemaahi24 commented 8 years ago

For reference i have copy the code pf ldap.php

'result.email' => "mail", 'result.active.flag' => "active", 'result.emp.num' => "",

snipe commented 8 years ago

1) Using what method? Login sync or manual LDAP sync? 2) Is your email field actually called mail? 3) Are you getting any errors? What exactly is happening. More info is necessary here.

hegdemaahi24 commented 8 years ago

@snipe 1) Using what method? Login sync or manual LDAP sync?

   Manual sync?

2) Is your email field actually called mail? snapshot below of my active directory attribute editor attribute

3) Are you getting any errors? What exactly is happening. More info is necessary here. Nothing error when i sync Manually. sync snapshot below.. in snapshot you can see the email field is blank

sysnc ldap

hegdemaahi24 commented 8 years ago

@snipe you want any other logs? which will help you to troubleshoot

hegdemaahi24 commented 8 years ago

@snipe i have configured in GUI itself. Please check the snapshot. I am not getting any errors. But its is not syncing my email from user

ldap in gui

hegdemaahi24 commented 8 years ago

@snipe in view php or js file the Ldap sync happens? can we look into there

snipe commented 8 years ago

Neither, it happens in the controller, and the controller looks exactly the way I would expect it to look.

hegdemaahi24 commented 8 years ago

its liitle strange firstname and last name is syncing but why not email. quite confused.

hegdemaahi24 commented 8 years ago

For testing purpose i put

In ldap setting Lastname = mail

testmaile

after i sync again

Lastname got field with email id

mailgotsync

As per this testing what may be the problem.

hegdemaahi24 commented 8 years ago

@snipe Please refer this

ddreier commented 8 years ago

This is unrelated to the email issue. But, @mahesh2471990, the "LDAP Authentication Query" field is incorrect for Active Directory. It should be samaccountname= not uid=.

On line 1205 of UsersController.php it's looking for ldap_email_field in the settings, but the field name is just ldap_email. Should be fixed by #1598.

hegdemaahi24 commented 8 years ago

Thank You so much @ddreier It work. Even EmployeeNumber is same $ldap_result_emp_num = Setting::getSettings()->ldap_emp_num;

after i removed field it got sync Up.

@snipe @ddreier Please the changes for EmployeeNumber also.

@thank you for your support @snipe

subramanyaHD commented 7 years ago

@mahesh2471990 My snipe-IT unable to fetch email ID even after adding ldap_email_field, Do you have any other resolutions for this issu ?

askarbacker commented 1 year ago

Hi @hegdemaahi24 Can I have your contact number please? I am having the same issue with LDAP email

volkerp commented 1 year ago

I've the same problem with Univention Corporate Server as ldap server. The field is called mailPrimaryAddress in the ldap server, but it is for some reason inaccessible by snipe.