  In this study, we explore the possibility of testing the no-hair theorem with
gravitational waves from massive black hole binaries in the frequency band of
the Laser Interferometer Space Antenna (LISA). Based on its sensitivity, we
consider LISA's ability to detect possible deviations from general relativity
(GR) in the ringdown. Two approaches are considered: an agnostic quasi-normal
mode (QNM) analysis, and a method explicitly targeting the deviations from GR
for given QNMs. Both approaches allow us to find fractional deviations from
general relativity as estimated parameters or by comparing the mass and spin
estimated from different QNMs. However, depending on whether we rely on the
prior knowledge of the source parameters from a pre-merger or
inspiral-merger-ringdown (IMR) analysis, the estimated deviations may vary.
Under some assumptions, the second approach targeting fractional deviations
from GR allows us to recover the injected values with high accuracy and
precision. We obtain $(5\%, 10\%)$ uncertainty on ($\delta \omega, \delta
\tau)$ for the $(3,3,0)$ mode, and $(3\%, 17\%)$ for the $(4,4,0)$ mode. As
each approach constrains different features, we conclude that combining both
methods would be necessary to perform a better test. In this analysis, we also
forecast the precision of the estimated deviation parameters for sources
throughout the mass and distance ranges observable by LISA.
