X-ray photoelectron spectroscopy (XPS) is used to follow some of the electrical properties of a segmented silicon photodetector, fabricated in a p-n-p configuration, during operation under various biasing configurations. Mapping of the binding energy position of Si2p reveals the shift in the position of the junctions with respect to the polarity of the DC bias applied. Use of squared and triangular shaped wave excitations, while recording XPS data, allows tapping different electrical properties of the device under normal operational conditions, as well as after exposing parts of it to harsh physical and chemical treatments. Unique and chemically specific electrical information can be gained with this noninvasive approach which can be useful especially for localized device characterization and failure analyses.