The reactive surface sites of MoS2 hydrotreating catalysts (unpromoted as well as Co-and Ni-promoted) supported on MgAl2O4 spinel were investigated with respect to the substitution of sulfur by oxygen using in-situ XAS coupled with modulation excitation spectroscopy (MES). Specifically, MES experiments were carried out by periodically cycling between a H2O and H2S containing hydrogen gas mixture at 400 °C. Due to the low fraction of SO exchange, conventional XANES and EXAFS data hardly showed any changes when these catalysts were exposed to increasing ratios of H2O to H2S in an H2 atmosphere. XANES and EXAFS data extracted at the Mo K-edge by MES analysis showed that for approximately 1 % of the Mo atoms, sulfur atoms are replaced by oxygen atoms when exposed to H2O, causing partial oxidation of these active sites. The reaction is reversible and Mo returns to its initial sulfide phase when H2O is removed and H2S is supplied in the feed. In case of Co-and Ni-promoted catalysts, the magnitude of SO exchange was found to be reduced, indicating the beneficial effect of promotion. MES at the Ni K-edge showed that Ni was oxidized during H2O exposure, which in turn delayed the Mo oxidation in the Ni-promoted catalyst. The structure of these catalysts under SO exchange were modelled using density functional theory (DFT) calculations, showing that the edge atoms are affected strongly. For all three catalysts, OH substitution is more favorable, while O substitution could be possible at high H2O pressure for unpromoted MoS2. Mo K-edge XANES spectra calculated using these simulated structures support the results obtained from the MES experiments. The presented approach using MES in combination with XAS and supported by DFT can be extended in general to catalysts under operando conditions, and is thus a useful tool for determination of the active site on an atomic-scale.