i need to fetch data from active directory for which i have a VB.net code but when i am using this code in the invoke code activity then it is not working.
i directly pasted the code in invoke code activity but it looks that i missed out something.
can anyone please let me know how to use this below code to fetch data from active directory:
Dim defaultNamingContext as string
dsEntry = new DirectoryEntry(“GC://rootDSE”)
defaultNamingContext = dsEntry.Properties(“rootDomainNamingContext”).Value.ToString()
dsEntry = new DirectoryEntry(“GC://” & defaultnamingcontext)
ds.SearchRoot = dsEntry
ds.Filter = “(” & SearchCriteria & “=” & SearchString & “)”
sr = ds.FindOne()
OutputValue = sr.Properties(FieldToBeExtracted)(0)
sr = Nothing
- [AD ID]
- Search criteria
- Exists (flag)