  Let $\mathcal{S}$ be an integrable Pfaffian system. If it is invariant under
a transversally free infinitesimal action of a finite dimensional real Lie
algebra $g$ and consequently invariant under the local action of a Lie group
$G$, we show that the vertical variational cohomology of $\mathcal{S}$ is equal
to the Lie algebra cohomology of $g$ with values in the space of the horizontal
cohomology in maximum dimension. This result, besides giving an effective
algorithm for the computation of the variational cohomology of an invariant
Pfaffian system, provides a method for detecting obstructions to the existence
of finite or infinitesimal actions leaving a given system invariant.
