From: pearly Date: 2007-06-27T00:05:07+09:00 Subject: Net::LDAP and telephonenumber attribute Hi, Using the LDAP service of a Lotus Notes / Domino server, I cannot get the telephone attribute for people. Sad it is but Lotus like M$ call it telephonenumber. I use 'net/ldap' for this which works fine for other attributes. Net::LDAP#search delivers an Array of Net::LDAP::Entry objects, and I can call attributes like the following simplified example shows: ldap.search( :base => base, :filter => ldap_filter ) do |entry| puts "DN: #{entry.dn} Name: #{entry.givenname} #{entry.sn}" end Now, it looks like the telephonenumber attribute is not delivered. Having done a simillar application in Perl (using Net::LDAP) which still works with the same LDAP server and parameters, I know the attribute should be there. But the following results in a NoMethodError exception. ldap.search( :base => base, :filter => ldap_filter ) do |entry| puts "Phone: #{entry.telephonenumber}" end Using entry.telephone doesn't help, and adding the attribute list to the Net::LDAP#search (e.g. [:dn, :sn, :telephonenumber]) doesn't help. Btw: In the above code block I tried entry.methods.sort and was really surprised it did not show things like 'dn' or 'mail' as its methods; however they are working. Any idea how to get this telephonenumber attribute? MP