  Ultralight dark matter (ULDM) is one of the leading well-motivated dark
matter candidates, predicted in many theories beyond the standard model of
particle physics and cosmology. There have been increasing interests in
searching for ULDM in physical and astronomical experiments, mostly assuming
there are additional interactions other than gravity between ULDM and normal
matter. Here we demonstrate that even if ULDM has only gravitational
interaction, it shall induce gravitational perturbations in solar system that
may be large enough to cause detectable signals in future gravitational-wave
(GW) laser interferometers in space. We investigate the sensitivities of
Michelson time-delay interferometer to ULDM of various spins, and show vector
ULDM with mass $m\lesssim 10^{-18}~$eV can be probed by space-based GW
detectors aiming at $\mu$Hz frequencies. Our findings exhibit that GW detectors
may directly probe ULDM in some mass ranges that otherwise are challenging to
examine.
