Let $V$ be a finite dimensional vector space.
Let us call an automorphism $T:V\rightarrow V$ **admissible** if there exists an inner product $\langle , \rangle$ on $V$ making $T$ an isometry.


We know $T$ is admissible if and only if there exists a basis for $V$ such that the representing matrix of $T$ w.r.t to this basis is orthogonal. ([see this question of mine for details](https://math.stackexchange.com/questions/1229804/under-what-conditions-is-a-linear-automorphism-an-isometry-of-some-inner-product)).


Similarly, we call a finite sequence of linear automorphisms $T\_i:V\_i\rightarrow V\_{i+1}$ for $i=1,...n-1$ and $T\_n:V\_n\rightarrow V\_1$ **admissible** if there exists inner products $\langle , \rangle\_i$ on $V\_i$ making all the $T\_i$ isometries.


It is easy to see that a sequence is admissible if and only if the composition $T\_n \circ T\_{n-1} \circ ... \circ T\_1:V\_1\rightarrow V\_1$ is admissible.


Now assume we have a diffeomorphism $\phi:M\rightarrow M$. ($M$ is a smooth manifold). A necessary condition for the existence of a Riemannian metric on $M$ making $\phi$ an isometry is a "pointwise" condition: 
For every fixed point $p\in M$ of $\phi$, $d\phi\_p:T\_pM\rightarrow T\_pM$ should be admissible. More generally, for evey finite orbit of $\phi$ the corresponding sequence of differentials must be admissible. 


For infinite orbits we have no pointwise constraints, since we can just pick an inner product on one of the tangent spaces in the orbit, and take the induced (pulled-back or pushed-forward) inner products on consecutive spaces ad infinitum. 


**My Question:** Assume $\phi$ satisfies all the poinwise conditions mentioned above. Is there a Riemannian metric making $\phi$ an isometry? 


The question boils down to whether we can glue together all the different inner products into a **smoothly** changing inner product. (Note that we have some degrees of freedom in choosing the preserved inner product on each tangent space, [since an admissible automorphism can have many different preserved products](https://math.stackexchange.com/questions/1240982/characterise-the-set-of-inner-products-which-are-preserved-by-a-given-automorphi))


**Update:**


In the case where there are no finitie orbits (or "almost none") it is demonstrated by the answers of Matveev & Sawin below that there is a global obstruction. 


Two questions arise:


1) What happens if all the orbits are finite?


Well, it turns out that any diffeomorphism which has only finite orbits [is actually of finite order](https://mathoverflow.net/questions/204516/is-there-a-diffeomorphism-with-only-finite-orbits-but-of-infinite-order), and for that case the answer is always positive, since we can [sum over translates of any initial metric](https://mathoverflow.net/a/30445/46290)


2) Can we find other conditions on the dynamics of the diffeomorphism which ensures a smooth metric exists? 



Is there a global obstruction for a diffeomorphism to be an isometry?
Yes, there are global obstructions. Consider $M= S^1 \times \mathbb R$ and $\phi$ acting by an irrational rotation on $S^1$ and by multiplication by $2$ on $\mathbb R$. There are no finite orbits, but also no invariant metrics: The function that takes a point $P$ on $S^1$ to the length of a vector pointing along $\mathbb R$ at $(P,0)$ is a function on $S^1$ that, when rotated irrationally, is multiplied by $2$. No nonzero such functions exist - consider what happens to the max and min when you rotate and multiply by $2$.


The general obstruction is that if you have an orbit whose closure has positive dimension, and take a sequence of powers $n$ such that $\phi^n(x)$ converges to $x$, then the absolute values of the eigenvalues of $d\phi^n(x)$ must converge to $1$. This doesn't depend on your choice of basis for the tangent space near $x$ because the eigenvalues depend continuously on the matrix and as $\phi^n(x)$ converges to $0$ you get a good result.


