Here we present linear and circular polarized soft x-ray absorption spectroscopy (XAS) data at the Ce M4,5 edges of the electron (Ir) and hole-doped (Re) Kondo semiconductor CeOs2Al10. Both substitutions have a strong impact on the unusual high Néel temperature, TN =28.5 K, and also the direction of the ordered moment in case of Ir. The substitution dependence of the linear dichroism is weak thus validating the crystal-field description of CeOs2Al10 being representative for the Re and Ir substituted compounds. The impact of electron-and hole-doping on the hybridization between conduction and 4f electrons is related to the amount of f 0 in the ground state and reduction of x-ray magnetic circular dichroism. A relationship of cf -hybridization strength and enhanced TN is discussed. The direction and doping dependence of the circular dichroism strongly supports the idea of strong Kondo screening along the crystallographic a direction.