0

i found this code to update a property on an active directory entry:

If user.Properties.Contains("title") Then

    user.Properties("title")(0) = employeeTitle.SelectedItem.Text

Else

    user.Properties("title").Add(employeeTitle.SelectedItem.Text)

End If

I understand it except for the ("title)(0). why is this a double index array. what does the (0) do?

Mike

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by adams161
0

Anyone have any ideas on this? Or just more generally what is the proper way to write to property fields in active directory like name or employee id for an update or first time write. (fields actually should all be created)

Also I couldn't figure out if my network is the one responsible for these fields like id or phone number or if they are already created fields by Microsoft and if this impacts how you write to different properties of a user.

This makes googleing a little tricky as I'm not sure if there is on method for all or it depends on the property.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.