Metallic, oxide and hydroxide environments of magnesium are clearly identified by X-ray photoelectron spectroscopy from chemical shift of Mg 1s and Mg 2p photopeaks. Unfortunately, Mg3N2 cannot be distinguished from MgO through these two peaks. In this work, we give evidence that it is possible to unambiguously identify magnesium nitride from magnesium oxide thanks to a Mg Auger parameter defined as the difference between the kinetic energy (KE) of the Mg K L L Auger peak and the KE of the Mg 1s peak. The value obtained for Mg3N2 (1000.0 eV) is quite different from the one observed for MgO (998.6 eV). Values obtained for metallic Mg and for Mg(OH)2 are, respectively, equal to 1004.2 and 997.5 eV. This parameter is then used in order to characterize the modification of the Mg chemical environment in the Al-5083 aluminum alloy (containing 4.5 at.% Mg) nitrided by a distributed electron cyclotron resonance nitrogen plasma.