The following excerpt is from Connes' Noncommutative Geometry
Let $(X, \mathcal{B}, \mu)$ be a standard Borel space equipped with a probability measure $\mu$, and let $\ T$ be a Borel transformation of $(X, \mathcal{B})$ that leaves $\mu$ invariant. Let $M = L^\infty(X, \mathcal{B}, \mu)$ and let $\varphi$ be the state associated with $\mu$. Then $T$ determines an automorphism of $M$ that preserves $\varphi$, by the equality $$\theta(f) = f \circ T^{−1}.$$ Conversely, every automorphism of $M$ that preserves $\varphi$ can be obtained in this way.
My question concerns the "conversely" part of the above excerpt: How does one obtain a measure-preserving transformation (henceforth m.p.t) $T$, given the automorphism $\theta$ on $M$?
One route that I've taken is to identify $X$ with $\hat{X}$, the character space of $L^\infty$. In other words, $\hat{X}:=\{\hat{x}:L^\infty(X,μ)\rightarrow \mathbb{C}\mid \hat{x}(f)=f(x)\}$ consists of point evaluations. The character space $\hat{X}$ is a compact Hausdorff space under the weak$^*$ topology inherited from the dual space of $L^\infty$. Define $T:\hat{X}\rightarrow \hat{X}$ by the prescription $T(\hat{x})=\hat{x}\circ \theta^{-1}$. I think this is the m.p.t that I am looking for. However, I do not know how to prove that T is indeed an m.p.t.
If such a result is true, then it must be very well-known. A reference to the proof of such a result would be gladly appreciated.
EDIT: In light of Blackburne's answer I've added the "descriptive-set-theory" tag.