AD displayName not showing in Roster

We’re using Openfire 3.4.5 and have configured it to link to our Active Directory (Windows Server 2003). This works well and was really easy to set up but I’m having difficulty configuring Openfire to show the users’ displayName in their roster rather than their account name. For historical reasons our account names are 8 characters and generated by an algorithm. If you don’t know the algorithm it’s difficult to tell who someone is from their account name alone. Users are finding this quite frustrating and it’s hindering take-up of the service. I’ve seen a number of other posts relating to this but have not seen a definitive answer - how can I get Spark to show the displayName in the users’ rosters?

I have attached our openfire.xml but with security settings removed. We have also tried a number of other clients, Pandion, Pidgin etc. and all behave in the same way as Spark. I have also noticed that where we ‘share’ a domain Group the user’s displayName IS shown in the roster, so we’re only having the display name issue where individual users have searched AD and added contacts themselves. However, we don’t want to have to administer Openfire any more than is necessary so sharing all or some of our groups would not be a preferred solution.

Thanks in advance!

Hi,

we have the same setup

try

<vCard xmlns=“vcard-temp”>

<FN></FN>

in your openfire.xml and restart

it seems that the clients use the first parameter as the displayname.

This is the vCard mapping that works with Spark and AD. It Fills in the name fields correctly.

<vcard-mapping><![CDATA[

<vCard xmlns=“vcard-temp”>

<N>

<GIVEN></GIVEN>

</N>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<FN></FN> <NICKNAME></NICKNAME>

<ADR>

<HOME/>

<STREET></STREET>

<PCODE></PCODE>

<CTRY></CTRY>
</ADR> <ADR>
<WORK/> <STREET></STREET> <LOCALITY></LOCALITY> <REGION></REGION> <PCODE></PCODE> <CTRY></CTRY>

</ADR>

<TEL>

<HOME/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<HOME/>

<CELL/>

<NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <VOICE/> <NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <CELL/> <NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<FAX/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

<ORG>

<ORGUNIT></ORGUNIT>

</ORG>

</vCard>]]></vcard-mapping>

Thanks for your suggestions but I can’t see what the difference is between your suggested vcard-mapping and the one in my openfire.xml: both FN and NICKNAME are set to . Is the order of the elements critical? Sparki’s suggestion of moving FN to the first element in the list made no difference for us.

with the setup from mtstravel, which seems to be the default AD setup, we have the problem that all Clients (we use spark, pidgin and miranda) use GIVENNAME as displayname and we have many persons with Michael as givenname. And there is no FAMILYNAME

So I have changed my setup and all fields are now filled in fine. My setup is:

<vCard xmlns=“vcard-temp”>

<FN></FN>

<N>

<GIVEN></GIVEN>

<FAMILY></FAMILY>

</N>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<NICKNAME></NICKNAME>

<ADR>

<HOME/>

<STREET></STREET>

<PCODE></PCODE>

<CTRY></CTRY>
</ADR>
<ADR>
<WORK/>
<STREET></STREET>
<LOCALITY></LOCALITY>
<REGION></REGION>
<PCODE></PCODE>
<CTRY></CTRY>

</ADR>

<TEL>

<HOME/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<HOME/>

<CELL/>

<NUMBER></NUMBER>
</TEL>
<TEL>
<WORK/>
<VOICE/>
<NUMBER></NUMBER>
</TEL>
<TEL>
<WORK/>
<CELL/>
<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<FAX/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

<ORG>

<ORGUNIT></ORGUNIT>

</ORG>

</vCard>]]>

This works for me with Openfire 3.4.5 Windows2003 and many clients.

I just realized that my last post had a bad vCard mapping. I do not know how, but it did. This shoould be the correct one:

<vcard-mapping><![CDATA[

<vCard xmlns=“vcard-temp”>

<N>

<FAMILY></FAMILY>

<GIVEN></GIVEN>

</N>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<FN></FN> <NICKNAME></NICKNAME>

<PHOTO>

<TYPE>image/jpeg</TYPE>

<BINVAL></BINVAL>

</PHOTO>

<ADR>

<HOME/>

<STREET></STREET>

</ADR>

<ADR>

<WORK/>

<STREET></STREET>

<LOCALITY></LOCALITY>

<REGION></REGION>

<PCODE></PCODE>

</ADR>

<TEL>

<HOME/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<CELL/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

<ORG>

<ORGUNIT></ORGUNIT>

</ORG>

</vCard>]]></vcard-mapping>

Once again, thanks for your suggestions but your vcard-mapping is the same as mine as far as the name related fields go - although I attached my original openfire.xml to my first post I’m also including our current mapping below. What else could be causing Openfire to show the SAMAccountName rather than the displayName in users’ rosters?

<vCard xmlns=“vcard-temp”>

<FN></FN> <N>
<FAMILY></FAMILY>
<GIVEN></GIVEN>
</N> <NICKNAME></NICKNAME>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<ADR>

<WORK/>

<STREET></STREET>

<LOCALITY></LOCALITY>

<REGION></REGION>

<PCODE></PCODE>

<CTRY></CTRY>

</ADR>

<TEL>

<WORK/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<CELL/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<FAX/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

<ORG>

<ORGNAME></ORGNAME>

<ORGUNIT></ORGUNIT>

</ORG>

</vCard>]]></vcard-mapping>

Let’s expand on the openfire.xml a little:

<usernameField>sAMAccountName</usernameField>

<searchFilter>(objectClass=organizationalPerson)</searchFilter>

<vcard-mapping><![CDATA[

<vCard xmlns=“vcard-temp”>

<N>

<FAMILY></FAMILY>

<GIVEN></GIVEN>

</N>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<FN></FN> <NICKNAME></NICKNAME>

<ADR>

<HOME/>

<STREET></STREET>

<PCODE></PCODE>

<CTRY></CTRY>
</ADR> <ADR>
<WORK/> <STREET></STREET> <LOCALITY></LOCALITY> <REGION></REGION> <PCODE></PCODE> <CTRY></CTRY>

</ADR>

<TEL>

<HOME/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<HOME/>

<CELL/>

<NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <VOICE/> <NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <CELL/> <NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<FAX/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

<ORG>

<ORGUNIT></ORGUNIT>

</ORG>

</vCard>]]></vcard-mapping>

<nameField>givenName</nameField>

<emailField>mail</emailField>

<groupNameField>cn</groupNameField>

<groupMemberField>member</groupMemberField>

<groupDescriptionField>description</groupDescriptionField>

<posixMode>false</posixMode>

<groupSearchFilter>(objectClass=group)</groupSearchFilter>

The only difference to what I have is that I have <nameField>displayName</nameField>, rather than <nameField>givenName</nameField> as you have. However our rosters could be drawn from 2000+ employees and givenName is not enough to identify the user. How can we use displayName in the roster?

I have found the problem and it is not with Openfire but with Spark.

When I add a contact I’m presented with the attached dialogue showing the jid, the Nickname and the Group that the new contact will be added to. Spark is ignoring the Nickname defined in the vcard and is using the first part of the jid instead - see the attached screenshot. Although I can add the user with the correct display name by clearing the nickname field at this point there are further issues which then prevent me adding the user to my roster correctly. I have tried the same process with Pandion and there are no issues - the user is simply added with the correct display name. Should I continue to expand on this issue in this thread or start a new one under Spark Support?

I am having the same trouble with Spark. We use Sun LDAP and have the mappings set properly but when people accept add requests to their roster the nickname is always replaced with the <usernameField> (i.e. uid) and the <NICKNAME> mapping is ignored. Since are user names are meaningless it causes a bit of confusion. Is there a bug open for this on the Spark client side? My config is attached.

<usernameField>uid</usernameField>

<vcard-mapping><![CDATA[

<vCard xmlns=“vcard-temp”>

<N>

<GIVEN></GIVEN>
</N> <EMAIL>
<INTERNET/> <USERID></USERID>
</EMAIL> <FN></FN>

<NICKNAME></NICKNAME>

<ADR>

<HOME/>

</ADR>

<ADR>

<WORK/>

</ADR>

<ORG>

<ORGUNIT></ORGUNIT>

</ORG>

</vCard>]]></vcard-mapping>

<nameField>cn</nameField>

<emailField>mail</emailField>

<groupNameField>cn</groupNameField>

<groupMemberField>member</groupMemberField>

<groupDescriptionField>description</groupDescriptionField>

<posixMode>false</posixMode>

</ldap>

<provider>

<vcard>

<className>org.jivesoftware.openfire.ldap.LdapVCardProvider</className& gt;

</vcard>

<user>

<className>org.jivesoftware.openfire.ldap.LdapUserProvider</className&g t;

</user>

<auth>

<className>org.jivesoftware.openfire.ldap.LdapAuthProvider</className&g t;

</auth>

<group>

<className>org.jivesoftware.openfire.ldap.LdapGroupProvider</className& gt;

</group>

</provider>

<setup>true</setup>

<log>

<debug>

<enabled>false</enabled>

</debug>

</log>

</jive>

in spark if you are manually adding users to your roster the nickname is autoentered as the userid of the username. If you want it to be something else you need to tab to that field and change it before saving the user to your roster. This can be avoided by using shared groups which auto-populate users to the rosters. This will use vCard data to add the names to the roster.

Thanks for the explanation. We can’t auto populate our rosters so people use the search feature to find and manually add others to their roster. We have documented the way Spark behaves for our users but it just seems counter intuitive. Especially since when you get an invitation it is the UID and so makes it difficult to know who is really asking to be added to your roster.

Just because you have me curious, but why can’t you auto-populate the roster?

Don’t forget to mark this thread as answered (and award any points as merited), so that users know this issue has been resolved.

I agree with a previous post that this should be raised as a bug in Spark. If the Nickname field is defined in the vcard then it should be used as the Nickname field when adding someone to your roster - otherwise there is no point in having a nickname field and the user might as well rename each entry manually.

How can we get this raised as a bug in Spark?

I am not sure this is a bug. If you are manually adding users to your roster at that poit spark has no idea if there is an associated vCard or not. That is why it gives you the option to assign a friendly nickname. auto-populated rosters depend on vCards to populate which is why the info is pulled as configured in openfire. I have manually added many users tha have no defined vCard data in the past so therefore would not have a defined nickname. If the user has a vCard after they are manually added you can see that info but it will not override you custom set information from the manual add to roster.

I am sure it is a bug! When I add a user to my roster using Pandion they are shown in the roster by their Nickname. If I close Pandion and open Spark the user is still shown under their nickname. It is only when I add a user to my roster using Spark that I have this issue. I appreciate that a vcard may not be available in all OpenFire installations but we are linking to Active Directory so there HAS to be a vcard available at the point that I add a user to my roster. Where else is Pandion getting the nickname from? Additionally if I look (in WinXP) at %userprofile%\Spark\user&lt;myjid>\vcards I can see a vcard for everyone on my roster whether they’re there through a published group or whether I have added them to my roster manually. The NickName is correctly stored in this local file however Spark still ignores it and uses the uid.

Spark is not ignoring the nickname it is using the one you provided when you manually added the user there by overriding what is coming from LDAP. Does the other client give you a field to override the nickname when adding a new user?

When I add a user manually that is on my AD domain and leave the nickname blank spark pulls the appropriate information from the LDAP vCard. So I guess the answer is to make sure you leave that field blank when manually adding unless you want to override the information provided by LDAP.