开发者

Using Active Directory Web Services in .Net application

I'm trying to build a .Net application to interrogate Active Directory.

Edit: I need to use a Web Service to do this as I will be talking to AD from a Sharepoint Workflow using a third party workflow tool that requires the use of a web service.

From my research, Windows 2008 R2 has Active Directory Web Services (ADWS) built in.

I can't find any details or examples anywhere on the web which tell 开发者_如何学运维me whether I should be able to use ADWS in a .Net application to read/write AD information.

Should I simply be able to add a web reference or is ADWS just for Powershell use.

Cheers,

Iain


Looks like they created ADWS for PowerShell's ActiveDirectory module and Active Directory Administrative Center only. Though it seems possible to consume it directly due to it's WCF nature. But no, there's not even a single article on MSDN or a blog post out there on the net about this topic.


If you need to query against AD, you can use .NET built insupport for querying Active Directory using either LDAP or ADSI.

The System.DirectoryServices namespace in .NET has all the tools you need to succesfully query, and manage AD objects.

The work flow is as follows:

  1. Create a DirectorySearcher Object
  2. Bind against your Active Directory (ie supply credentials)
  3. Create a search query filter
  4. Set any query parameters
  5. Execute the query
  6. Iterate over the result set
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜