We have succeeded in establishing the crystal-field ground state of CeRu2Al10, an orthorhombic intermetallic compound recently identified as a Kondo insulator. Using polarization dependent soft x-ray absorption spectroscopy at the Ce M4,5 edges, together with input from inelastic neutron and magnetic susceptibility experiments, we were able to determine unambiguously the orbital occupation of the 4f shell and to explain quantitatively both the measured magnetic moment along the easy a axis and the small ordered moment along the c-axis. The results provide not only a platform for a realistic modeling of the spin and charge gap of CeRu2Al10, but demonstrate also the potential of soft x-ray absorption spectroscopy to obtain information not easily accessible by neutron techniques for the study of Kondo insulators in general.