Measurements of the dynamical environment of supermassive black holes (SMBHs) are becoming abundant and precise. We use such measurements to look for ultralight dark matter (ULDM), which is predicted to form dense cores (solitons) in the centre of galactic halos. We search for the gravitational imprint of an ULDM soliton on stellar orbits near Sgr A* and by combining stellar velocity measurements with Event Horizon Telescope imaging of M87*. Finding no positive evidence, we set limits on the soliton mass for different values of the ULDM particle mass $m$. The constraints we derive exclude the solitons predicted by a naive extrapolation of the soliton-halo relation, found in DM-only numerical simulations, for $2times10^{-20}~{rm eV}lesssim mlesssim8times10^{-19}~{rm eV}$ (from Sgr A*) and $mlesssim4times10^{-22}~{rm eV}$ (from M87*). However, we present theoretical arguments suggesting that an extrapolation of the soliton-halo relation may not be adequate: in some regions of the parameter space, the dynamical effect of the SMBH could cause this extrapolation to over-predict the soliton mass by orders of magnitude.