Save data into extension attribute into active Directory RRS feed

  • Question

  • User1710955165 posted

    Hi all !!!

    I have a problem with saving some data into extensionattribute in AD.

    There is no problem with saving data into properties like "Mobile" or "SN" but when I try to save data into

    one of extensionAttribute , for example: extensionAttribute7 , I get an error "The attribute syntax specified to the directory service is invalid".

    There is no problems of read data from extension Attributes.

    I use code like this:

     public void SaveUserNotes(SearchResult user, string aboutMe, string myHobby)
                DirectoryEntry de = new DirectoryEntry(ADpath, ADUserName, ADUserPassword);
                DirectorySearcher search = new DirectorySearcher(de);
                DirectoryEntry dataToUpdate = user.GetDirectoryEntry();
                dataToUpdate.Properties["extensionAttribute5"].Value = aboutMe;
                dataToUpdate.Properties["extensionAttribute7"].Value = myHobby;

    It works good with "standard" properties.

    Can anyone help me ?

    Friday, June 25, 2010 6:17 AM

All replies