  Using realistic cosmological simulations of Milky Way sized haloes, we study
their dynamical state and the accuracy of inferring their mass profiles with
steady-state models of dynamical tracers. We use a new method that describes
the phase-space distribution of a steady-state tracer population in a spherical
potential without any assumption regarding the distribution of their orbits.
Applying the method to five haloes from the Aquarius $\Lambda$CDM N-body
simulation, we find that dark matter particles are an accurate tracer that
enables the halo mass and concentration parameters to be recovered with an
accuracy of $5\%$. Assuming a potential profile of the NFW form does not
significantly affect the fits in most cases, except for halo A whose density
profile differs significantly from the NFW form, leading to a $30\%$ bias in
the dynamically fitted parameters. The existence of substructures in the dark
matter tracers only affects the fits by $\sim 1\%$. Applying the method to mock
stellar haloes generated by a particle-tagging technique, we find the stars are
farther from equilibrium than dark matter particles, yielding a systematic bias
of $\sim 20\%$ in the inferred mass and concentration parameter. The level of
systematic biases obtained from a conventional distribution function fit to
stars is comparable to ours, while similar fits to DM tracers are significantly
biased in contrast to our fits. In line with previous studies, the mass bias is
much reduced near the tracer half-mass radius.
