By measuring polarization of the received radio-frequency signals. The polarization is affected by magnetic fields ("Faraday rotation", see [0, 1]).
[0] https://en.wikipedia.org/wiki/Faraday_effect#In_the_interste...
[1] https://www.mpifr-bonn.mpg.de/research/fundamental/cosmag