Jul 02, 2015 08:45 AM|ToM1202|LINK
I can get some interesting metadata of an AD object using ActiveDirectoryReplicationMetadata, e.g. Version, LocalChangeUSN, OriginatingChangeUSN, OriginatingServer, ... with the following code:
DirectoryContext domainContext = new DirectoryContext(DirectoryContextType.Domain, "targetDomainName", "validUserInDomain", "validUserPassword");
var domain = System.DirectoryServices.ActiveDirectory.Domain.GetDomain(domainContext);
var dc = domain.FindDomainController();
var metadata = dc.GetReplicationMetadata("distinguishedNameOfWantedObject");
Is there any way in C# to also get the information which account did the last change?
NB: I know that I can turn on AD DS Auditing and query the event log for that information but I need to know if there is a solution without the event log.