  We present the results of a magnetic survey of a sample of eight beta Cephei
stars and 26 Slowly Pulsating B stars with FORS1 at the VLT. A weak mean
longitudinal magnetic field of the order of a few hundred Gauss is detected in
the beta Cephei star xi^1 CMa and in 13 SPB stars. The star xi^1 CMa becomes
the third magnetic star among the beta Cephei stars. Before our study, the star
zeta Cas was the only known magnetic SPB star. All magnetic SPB stars for which
we gathered several magnetic field measurements show a field that varies in
time. We do not find a relation between the evolution of the magnetic field
with stellar age in our small sample. Our observations imply that beta Cephei
stars and SPBs can no longer be considered as classes of non-magnetic
pulsators, but the effect of the fields on the oscillation properties remains
to be studied.
