powered by Jive Software

vCard Mappings for Active Directory for Openfire 3.6.x and above

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. To make changes to the default mappings edit the system property ldap.vcard-mapping. 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.

<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>

It works partially on Server 2003, I had to remap the { postOfficeBox} section to reflect the actual field the address is stored in -> {streetAddress}. Once that was mapped, the addresses filled the field correctly. If I find anything else, I will post it. Thanks.

Can you please tell me where, in AD2003, you are storing the photos? I find a lot of info about using avatars in AD2008 and Exchange 2010 but not an all '03 AD. Thanks!!

1 Like

I don’t store them in AD, I store them within the SQL database, much easier than trying to store them in AD. If you want them in AD, you actually have to convert your images into a binary file and then use that to map to each user specified. A big pain in the rear. Just use the ldap.overide.avatar in the openfire settings = true. This will store all your images within the DB.