The electron spin resonance in a NbAuPb Josephson junction is reported. The gold layer was alloyed with 100 to 1000 ppm Gd and 167Er, respectively. Resonances are observed in the I-V cureves at frequencies equivalent to the crystal-field splitting of AuGd (1.0 and 1.7 GHz) and to the hyperfine splitting of Au 167Er (2.87 GHz). The basic idea of this type of ESR-Josephson spectroscopy and the application are discussed. The magnetic field dependence of Ic is described and compared with a simulation.