how to query changes in Active Directory including deleted objects?

后端 未结 2 736
旧时难觅i
旧时难觅i 2021-01-13 18:52

I am using below code to query changes to users/OUs in AD. But it doesn\'t retrive any deleted objects, Any idea how to include deleted objects in this ?

sta         


        
2条回答
  •  有刺的猬
    2021-01-13 19:48

    As for as my experience with SearchRequest the filter will not work at any cost, it has its own issue.. and to your case to get Deleted Objects changes you should use Domain Admin privileged account or something like that..

    Here, you need to you give the privileged account who has complete rights over Deleted Objects container.

    System.Net.NetworkCredential cr = new System.Net.NetworkCredential(@"administrator", "xxx", "xxx");
            LdapConnection connection = new LdapConnection(str_dcName);
    

提交回复
热议问题