The magnetic fields of an integrated MR-Linac system will alter the paths of electrons that produce ions in the ionization chambers. The dose response of selected ion chambers is evaluated in the presence of varying transverse and longitudinal magnetic fields. The investigation is useful in calibration of therapeutic x-ray beams associated with MR-Linac systems. The Monte Carlo code PENELOPE was used to model the irradiation of NE2571, and PR06C ionization chambers in the presence of a transverse and longitudinal (with respect to the photon beam) magnetic fields of varying magnitude. The long axis of each chamber was simulated both parallel and perpendicular to the incident photon beam for each magnetic field case. The dose deposited in each chamber for each case was compared to the case with zero magnetic field by means of a ratio. The PR06C chamber's response was measured in the presence of a transverse magnetic field with field strengths ranging from 0.0 to 0.2 T to compare to simulated results. The simulations and measured data show that in the presence of a transverse magnetic field there is a considerable dose response (maximum of 11% near 1.0 T in the ion chambers investigated, which depends on the magnitude of magnetic field, and relative orientation of the magnetic field, radiation beam, and ion chamber. Measurements made with the PR06C chamber verify these results in the region of measurement. In contrast, a longitudinal magnetic field produces only a slight increase in dose response (2% at 1.5 T) that rises slowly with increasing magnetic field and is seemingly independent of chamber orientation. Response trends were similar for the two ion chambers and relative orientations considered, but slight variations are present from chamber to chamber. Care must be taken when making ion chamber measurements in a transverse magnetic field. Ion chamber responses vary not only with transverse field strength, but with chamber orientation and type, and can be considerable. Longitudinal magnetic fields influence ion chamber responses relatively little (2% at 1.5 T), and only at field strengths in excess of 1.0 T.