We discuss the possibility of obtaining highly precise measurements of the ionization potential depression in dense plasmas with spectrally resolved x-ray scattering, while simultaneously determining the electron temperature and the free electron density. A proof-of-principle experiment at the Linac Coherent Light Source, probing isochorically heated carbon samples, demonstrates the capabilities of this method and motivates future experiments at x-ray free electron laser facilities.