  We show that a black hole surrounded by scalar dark matter develops scalar
hair. This is the generalization of a phenomenon pointed out by Jacobson, that
a minimally coupled scalar with a non-trivial time dependence far away from the
black hole would endow the black hole with hair. In our case, the time
dependence arises from the oscillation of a scalar field with a non-zero mass.
We systematically explore the scalar profile around the black hole for
different scalar masses. In the small mass limit, the scalar field has a $1/r$
component at large radius $r$, consistent with Jacobson's result. In the large
mass limit (with the Compton wavelength of order of the horizon or smaller),
the scalar field has a $1/r^{3/4}$ profile yielding a pile-up close to the
horizon, while distinctive nodes occur for intermediate masses. Thus, the dark
matter profile around a black hole, while challenging to measure, contains
information about the dark matter particle mass. As an application, we consider
the case of the supermassive black hole at the center of M87, recently imaged
by the Event Horizon Telescope. Its horizon size is roughly the Compton
wavelength of a scalar particle of mass $10^{-20}$ eV. We consider the
implications of the expected scalar pile-up close to the horizon, for fuzzy
dark matter at a mass of $10^{-20}$ eV or below.
