Multi-agent networks consist of autonomous nodes, where each node maintains and updates its state based on exchanged information with its neighboring nodes. Due to the collaborative nature of state updates, if one or more nodes were to misbehave by deviating from the pre-specified update rule, they can bias the states of other nodes and thus drive the network to an undesirable state. In this paper, we present a query-based mechanism for a third-party verifier to detect misbehaving nodes. The proposed mechanism consists of two components. The first component determines whether the state of the queried node is consistent with its ideal value. The second component identifies the set of misbehaving nodes that induced the inconsistency. We prove that our approach detects the set of misbehaving nodes, as well as the times of their misbehaviors, by establishing the equivalence of our approach to a tree-generation algorithm. We evaluate our approach through simulation study which corroborates the theoretical guarantees, and analyzes the performance of our scheme as a function of the number of queried nodes.