how to query changes in Active Directory including deleted objects?

后端 未结 2 750
旧时难觅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:50

    solution is need to add isDeleted=TRUE to request object

    SearchRequest request = new SearchRequest("DC=xx,DC=xxx,DC=com", 
      "(|(objectClass=organizationalUnit)(isDeleted=TRUE)(objectCategory=Person))",
      SearchScope.Subtree, attribs);
    

提交回复
热议问题