The polarization dependence of the near edge x-ray absorption spectroscopy (XANES) is an element specific probe to the real space distribution of the density of unoccupied states in solid state materials. In this work, we present Fe and As K-edge experiments of Ba(Fe 1−x M x ) 2 As 2 (M = Mn, Co and x = 0.0 and 0.08). The experiments reveal a strong polarization dependence of the probed XANES spectra, which concerns mainly an increase of the intensity of electronic transitions when the beam polarization is set out of the samples ab crystallographic plane. The results show that states with p z orbital character dominate the density of unoccupied states close to the Fermi level. Partial substitution of Fe by Co is shown to decrease the intensity anisotropy, suggesting that Co promotes electronic transfer preferentially to states with p z orbital character. On the other hand, Mn substitution causes the increase of the spectra p z orbital anisotropy, which is proposed to take place by means of an enhanced local Fe3d4p mixing, unveiling the role of Fe4p states in the localization of the Fe3d orbitals. Moreover, by comparing our results to previous experiments, we identify the relative mixing between Fe and the pnictide 4p x,y,z orbitals as a clear divide between the electronic properties of iron arsenides and selenides. Our conclusions are supported by multiple scattering theory calculations of the XANES spectra and by quantum chemistry calculations of Fe coordination electronic structure.