We report on the adsorption of a submonolayer of di-m-cyanoazobenzene (DMC) on Bi(111) and on the reversible switching of these molecules induced by resonant X-ray illumination. DMC adsorbs in at least two configurations, the flat trans and the nonflat cis isomer. We find that in 0.8 monolayers at least 26% of the molecules change their configuration at 110 K by excitation of the N1s → LUMO transition at the azo group, and by a thermally induced back reaction at 120 K. Nonresonant excitation with X-ray light does not induce any reversible changes.