In the measurement of X-ray magnetic circular dichroism (XMCD) spectra, external magnetic field is required during experiment. We have found that, if the X-ray absorption spectra are recorded using drain current, the spectrum intensity is strongly influenced by external magnetic field. The normalized signal intensity changes with the value of the deviation angle between magnetic field and sample surface, the amount of the external magnetic field and the relative position of beam spot on sample surface. In this paper, the K edge absorption spectra of oxygen contained in aluminum foil are measured in different magnetic field configurations. The variation trends of signal intensity with the change in various external parameters are indicated, and reasonable explanations have been given. The experimental data are well accordance with their corresponding fitting curves, suggesting that the model constructed in this paper is applicable for solving this problem. The article provides a basis for analyzing the effects of external field on drain current signal.