CS 2007 supports storing profile information in a combination of data source i.e. while creating a profile it is possible to store some information in a database (say SQL 2005) and some other information in Active Directory. In our application we were storing the user name, password, first name, last name etc in AD and other information was being stored in SQL 2005 database. While authenticating the user by providing UserId and password, AD validates the UserId against userPrincipalName. Unless this field is set to same a UserId, AD will not be able to authenticate the user. Hence while creating the account in AD using CS 2007 APIs, we need to set userPrincipalName as UserId. So while storing the User information in AD, these are the minimum set of information you may wish to map.
1. Cn = Common Name, same as UserId
2. sAmAccountName = Account Name, same as UserId
3. Givenname = First name
4. Sn -> LastName
5. userAccountControl as 101 to set the user as active
6. userPrincipalName as UserId to authenticate using AD