In Episode III, when he sees Mace Windu being electrocuted then thrown out of the window he seems shocked, but not surprised, and readily joins Palpatine, turning to the dark side.
When Palpatine tells him about Darth Plagueis, it's a pretty strong hint, so perhaps at this point he was already aware. But in Episode II, he seems to be oblivious of this fact. So when exactly does he learn about Palpatine's true identity?