Currently Being Moderated

vCard Mappings for Active Directory

VERSION 2

Created on: Sep 24, 2008 7:05 AM by Todd Getz - Last Modified:  Sep 24, 2008 10:23 AM by Todd Getz

The default Active Directory vCard mappings provided during the setup of openfire are incomplete.  Below is the vCard mappings for a business that will provide a nearly complete vCard.  If you wish to allow avatars for the users of AD LDAP you need to enable/add the system property ldap.override.avatar                  and set it to true.  I have also attached a sample openfire.xml file for openfire 3.5.x and below.

 

    <vcard-mapping><![CDATA[
<vCard xmlns="vcard-temp">
  <N>
    <FAMILY>{sn}</FAMILY>
    <GIVEN>{givenName}</GIVEN>
  </N>
  <EMAIL>
    <INTERNET/>
    <USERID>{mail}</USERID>
  </EMAIL>
  <FN>{displayName}</FN>
  <NICKNAME>{displayName}</NICKNAME>
  <PHOTO>
    <TYPE>image/jpeg</TYPE>
    <BINVAL>{jpegPhoto}</BINVAL>
  </PHOTO>
  <ADR>
    <HOME/>
    <STREET>{homePostalAddress}</STREET>
  </ADR>
  <ADR>
    <WORK/>
    <STREET>{postOfficeBox}</STREET>
    <LOCALITY>{l}</LOCALITY>
    <REGION>{st}</REGION>
    <PCODE>{postalCode}</PCODE>
    <CTRY>{c}</CTRY>
  </ADR>
  <TEL>
    <HOME/>
    <VOICE/>
    <NUMBER>{homePhone}</NUMBER>
  </TEL>
  <TEL>
    <WORK/>
    <VOICE/>
    <NUMBER>{telephoneNumber}</NUMBER>
  </TEL>
  <TEL>
    <WORK/>
    <CELL/>
    <NUMBER>{mobile}</NUMBER>
  </TEL>
  <TEL>
    <WORK/>
    <PAGER/>
    <NUMBER>{pager}</NUMBER>
  </TEL>
  <TEL>
    <WORK/>
    <FAX/>
    <NUMBER>{facsimileTelephoneNumber}</NUMBER>
  </TEL>
  <TITLE>{title}</TITLE>
  <URL>{wWWHomePage}</URL>
  <ORG>
    <ORGNAME>{company}</ORGNAME>
    <ORGUNIT>{department}</ORGUNIT>
  </ORG>
</vCard>]]></vcard-mapping> 
    <nameField>displayName</nameField>

Attachments:
Average User Rating
(0 ratings)




ickthwart ickthwart  says:

Hi

I have just installed OF 3.6.0a and everything is working fine.

I see that I need to edit the ldap.vcard-mapping system property.

However, when I edit it, I see some unusual formatting in the edit field.

Is it OK just to paste in the information above in the format it's in?

Olliiee Olliiee  says in response to ickthwart:

I made a test and had the same html <br> tags in my field. To avoid this tags, I made my changes directly on my MySQL database and it works without any problems.

More Like This

  • Retrieving data ...