User Display Name shows “i:0#.f|” using LDAP membership provider for FBA gives you –No Fix from MS Support


We had a MS Support case for the display names not showing up correctly for accounts in the Forms Auth using the LDAP membership provider.

Believe me whatever you do its not picking it up from Active Directory User Display Name instead the user display name is like

i:0#.f|mName|accountname

mName = membershipprovideraliasinCentralAdmin

accountname = account in Active Directory

  1. You would need to run a PowerShell command for the –Web parameter being the SiteCollection URL.
  2. You would need to login to that Site Collection at least once for the script to update the Display Name. This is something like alerts on a site will work for the user if we would have logged into that site collection at least once.

Set-SPUser “i:0#.f|mName|accountname” -Web http://sp2010/ -DisplayName "Atul Chhoda"

Advertisements

Tags: , ,

4 Comments on “User Display Name shows “i:0#.f|” using LDAP membership provider for FBA gives you –No Fix from MS Support”

  1. manuel December 7, 2010 at 1:54 pm #

    hi. where the “i:0#.f” comes from? i need to add programmatically users to sharepoint. and cannot understand if that works always.

    • atulchhoda December 7, 2010 at 3:41 pm #

      Manuel, If you are progmmatically adding users to the site, then set the DisplayName property on the SPUser object that you are adding to the site.
      You can fetch the display name from the Active Directory using the Directory Services.

      On your first question , SharePoint uses “i:0#.f” for forms based authentication and “i:0#.w” for windows based authentication . The issue is it doesn’t set the display name as compared to the Windows Authentication where you dont have to configure Forms Based authentication using a membership provider. As per my understanding the issue is with the LDAP membership provider which doesnt pull the Display Name from the Active Directory DisplayName.

      I hope this helps.

  2. vijaykishan January 3, 2012 at 1:07 pm #

    I have 10000 + users How do i get them correctly. Kindly advice

    • Jay Hebeh November 29, 2012 at 10:58 am #

      1. dsquery group -samid “The name of the AD group” | dsget group -members > GroupMembers.txt

      2. dsquery group -samid “The name of the AD group” | dsget group -members | dsget user -display > GroupMembersNames.txt

      3. dsquery group -samid “The name of the AD group” | dsget group -members | dsget user -email > GroupMembersEmails.txt

      In those 3 lines above you have more than enough info to figure it out. Good luck!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: