We report the hard x-ray photo-electron spectroscopy (HAXPES) and near edge x-ray absorption fine structure (NEXAFS) of CoFeBMgOCoFeB interfaces as a function of annealing time. Upon annealing, the oxidation state of B changes from predominantly elemental (0 valence) boron in the as deposited sample to higher oxidation in annealed samples as evident from HAXPES spectra. The NEXAFS spectroscopy results showed that upon heating, B species migrate towards the MgO and interact with it. A comparison of the tunnel junction NEXAFS signature with some standards suggests that the B forms a 3-fold coordinated boron compound in the MgO environment and 4-fold coordinated boron resembling Kotoite mineral in the CoFe/MgO interface. © 2011 American Institute of Physics.