Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAD property namesAD property names
Previous
 
Next
New Post
7/25/2007 1:49 PM
 

Hello,

I know just enough about AD to be dangerous so I hope I get my terminology right.  I think I have everything set -up properly...I can login with my AD account and my group memberships sync ok. however my firstname, lastname and fullname aren't populating. The guys manage our AD think that the default DNN authentication provider is looking at the wrong property names? They want me to look in "givenName" for First Name, "SN" for lastname and "fullName" for Full name.

What does DNN look for by default (4.5.1)? If I need to change the properties that its looking for, how would I go about doing that? Is there a config file somewhere?

I hope this makes sense and thanks for your help.

Mike

 
New Post
11/28/2007 8:44 AM
 

Hi,

I have exactly the same problem.

Can someone tell me where I would change the AD objects in DNN, so that I can tell DNN what AD object to use for firstname, lastname etc?

thanks

 

 
New Post
11/28/2007 1:19 PM
 

[EDIT] This is from the latest code for 4.6.2/4.7.0 - The location of this information may be different for the version you are using, but the values for the defaults should be the same.  You may also want to see this thread for instructions on how I modified this source to allow for custom values to be supplied through a XML file.[/EDIT]

You need to download the AD source code and then look at ADSIProvider for the code and Configuration to find what the values are:


        Private Sub FillUserInfo(ByVal UserEntry As DirectoryEntry, ByVal UserInfo As UserInfo)

            With UserInfo
                .IsSuperUser = False
                .Username = UserInfo.Username
                .Membership.Approved = True
                .Membership.LastLoginDate = Date.Today()
                .Email = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_EMAIL).Value)
                .CName = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_CNAME).Value.ToString)
                .DisplayName = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_DISPLAYNAME).Value)
                If .DisplayName = "" Then
                    .DisplayName = .CName
                End If
                .DistinguishedName = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_DISTINGUISHEDNAME).Value.ToString)
                .sAMAccountName = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_ACCOUNTNAME).Value.ToString)
                .Profile.FirstName = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_FIRSTNAME).Value)
                .Profile.LastName = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_LASTNAME).Value)
                .Profile.Street = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_STREET).Value)
                .Profile.City = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_CITY).Value)
                .Profile.Region = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_REGION).Value)
                .Profile.PostalCode = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_POSTALCODE).Value)
                .Profile.Country = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_COUNTRY).Value)
                .Profile.Telephone = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_TELEPHONE).Value)
                .Profile.Fax = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_FAX).Value)
                .Profile.Cell = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_CELL).Value)
                .Profile.Website = Utilities.CheckNullString(UserEntry.Properties(Configuration.ADSI_WEBSITE).Value)
                .AuthenticationExists = True
                ' obtain firstname from username if admin has not enter enough user info
                If .Profile.FirstName.Length = 0 Then
                    .Profile.FirstName = Utilities.TrimUserDomainName(UserInfo.Username)
                End If
            End With
        End Sub

 

        Public Const ADSI_DC As String = "dc"
        Public Const ADSI_NCNAME As String = "nCName"
        Public Const ADSI_DNSROOT As String = "dnsRoot"
        Public Const ADSI_GROUPTYPE As String = "groupType"
        Public Const ADSI_MEMBER As String = "member"
        Public Const ADSI_CNAME As String = "cn"
        Public Const ADSI_ACCOUNTNAME As String = "sAMAccountName"
        Public Const ADSI_DISTINGUISHEDNAME As String = "distinguishedName"
        Public Const ADSI_CANONICALNAME As String = "canonicalName"
        Public Const ADSI_UPN As String = "userPrincipalName"
        Public Const ADSI_DISPLAYNAME As String = "displayName"
        Public Const ADSI_FIRSTNAME As String = "givenName"
        Public Const ADSI_LASTNAME As String = "sn"
        Public Const ADSI_STREET As String = "streetAddress"
        Public Const ADSI_CITY As String = "l"
        Public Const ADSI_POSTALCODE As String = "postalCode"
        Public Const ADSI_REGION As String = "st"
        Public Const ADSI_COUNTRY As String = "co"
        Public Const ADSI_TELEPHONE As String = "telephoneNumber"
        Public Const ADSI_FAX As String = "facsimileTelephoneNumber"
        Public Const ADSI_CELL As String = "mobile"
        Public Const ADSI_HOMEPHONE As String = "homePhone"
        Public Const ADSI_EMAIL As String = "mail"
        Public Const ADSI_WEBSITE As String = "url"
        Public Const ADSI_DESCRIPTION As String = "description"
        Public Const ADSI_EMPLOYEEID As String = "employeeID"
        Public Const ADSI_COMPANY As String = "company"
        Public Const ADSI_MANAGER As String = "manager"
        Public Const ADSI_DEPARTMENT As String = "department"
        Public Const ADSI_ASSISTANT As String = "assistant"

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAD property namesAD property names


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out