|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
URGENT - Active Directory/VB.net help needed
HI,
The users i have in AD have multiple email addresses. In VB.net i'm able to retrieve/find teh user correctly, but don't know how to access the 2nd,3rd, 4th.... email addresses created on the account. Also, i need to update some users and add a 2nd/3rd/4th email address of either type=CUSTOM or type=SMTP how can i go about doing this? currently i have : objDirSearcher.Filter = "(&(objectClass=user)(sn=" + Name + "))" 'objDirSearcher.Filter = "(objectClass=user)" objCollSearchResult = objDirSearcher.FindAll() Select Case (objCollSearchResult.Count) Case 0 strEmailAddress = "" Case Is > 1 Exit Select Case Is = 1 objlSearchResult = objCollSearchResult.Item(0) objCollResultProperty = objlSearchResult.Properties objCollResultPropertyValue = objCollResultProperty.Item("mail") strEmailAddress = objCollResultPropertyValue.Item(1) ADResponse.Text = strEmailAddress End Select This gives me the first/primary email address on teh account. thanks in advance for your help. i have to get this done in the next few hours so its imperative that i have a response to this.. THANKS! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > URGENT - Active Directory/VB.net help needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|