Let $X$ be a non vanishing real analytic vector field on an open manifold $M$. What kind of obstructions would appear when we search for a Riemannian metric on $M$ such that the space of harmonic functions would be invariant under the derivation operator $f \mapsto X.f$? Note that a harmonic function is a function $f$ which satisfy $\Delta_g (f)=0$ where $\Delta_g$ is the Laplace operator associated to the metric $g$.