public static bool IsAuditFolder(MailboxSession session, StoreObjectId folderId) { Util.ThrowOnNullArgument(session, "session"); if (folderId == null) { return(false); } StoreObjectId auditsFolder = null; StoreObjectId adminAuditFolder = null; session.BypassAuditsFolderAccessChecking(delegate { auditsFolder = session.GetAuditsFolderId(); adminAuditFolder = session.GetAdminAuditLogsFolderId(); }); return(folderId.Equals(auditsFolder) || folderId.Equals(adminAuditFolder)); }