No.
These functions are called harmonic functions. The simplest example is $f(x,y)=xy$.
More generally, the real part of any holomorphic function $\mathbb C\to \mathbb C$ is a harmonic function $\mathbb C\to \mathbb R$.
Added later:
As mentioned by Gerald, harmonic functions are characterized by the property that $$\int_0^1f(z+re^{2\pi\theta})d\theta=f(z),\qquad \forall r\ge 0,\quad \forall z\in \mathbb C.$$ I don't know whether that property for $r=1$ implies that property for all $r\ge 0$.