An apparatus is presented to perform magnetic resonance measurements in a beam of doped helium nanodroplets. This type of experiment faces the same difficulties as traditional molecular beam electric/magnetic resonance experiments, namely, an optically thin sample. Like many of these traditional experiments, it uses lasers to prepare the states of interest and to detect them after manipulation with a microwave field. Unlike these traditional experiments, Zeeman substates cannot be resolved by the laser transition because of the droplet-induced line broadening. A magnetic dichroism scheme is used instead, exploiting the favorable selection rules for the absorption of circularly polarized light. ESR spectra are shown for K atoms captured on the surface of He nanodroplets. The extension of the method to other atoms and molecules, and to NMR spectroscopy, is discussed.