We study a problem of isometric compact 2-step nilmanifolds ${M}/\Gamma $ using some information on their geodesic flows, where $M$ is a simply connected 2-step nilpotent Lie group with a left invariant metric and $\Gamma $ is a cocompact discrete subgroup of isometries of $M$. Among various works concerning this problem, we consider the algebraic aspect of it. In fact, isometry groups of simply connected Riemannian manifolds can be characterized in a purely algebraic way, namely by normalizers. So, suitable factorization of normalizers and expression of a vector bundle as an associated fiber bundle to a principal bundle, lead us to a general framework, namely groupoids. In this way, drawing upon advanced ingredients of Lie groupoids, normal subgroupoid systems and other notions, not only an answer in some sense to our rigidity problem has been given, but also the dependence between normalizers, automorphisms and especially almost inner automorphisms, has been clarified.