System.DirectoryServices NameSpace Query

Dear Team,

I came across a scenario where I had to use DirectorySearcher() & I’m importing System.DirectoryServices namespace for the same. Despite the same, I’m not able to utilize the specified class.

Project dependencies include System.DirectoryServices V7.0.1 & currently using Studio V2021.10.6 Enterprise.

Kindly advice,
Thanks in advance.

Do you receive any error message?

If you are using it in an Invoke Code activity, you need to use the DirectorySearcher outside the Invoke Code first, e.g. by using an Assign activity or defining a (dummy) argument of type DirectorySearcher.

image

Without the argument, you will get the error: “Type ‘DirectorySearcher’ is not defined. …”

image

1 Like