Unconventional superconductivity in many materials is believed to be mediated by magnetic fluctuations. It is an open question how magnetic order can emerge from a superconducting condensate and how it competes with the magnetic spin resonance in unconventional superconductors. Here we study a model d-wave superconductor that develops spin-density wave order, and find that the spin resonance is unaffected by the onset of static magnetic order. This result suggests a scenario, in which the resonance in Nd0.05Ce0.95CoIn5 is a longitudinal mode with fluctuating moments along the ordered magnetic moments.