Near edge X-ray absorption fine structure and X-ray photoelectron spectroscopy have been employed to follow the reversible trans to cis isomerization of tetra-tert-butyl-azobenzene (TBA) adsorbed on Au(111). For one monolayer the molecules adopt an adsorption geometry characteristic of the trans-TBA isomer. The azo-bridge (N = N) is aligned nearly parallel to the surface and the phenyl rings exhibit a planar orientation with a small tilt angle <or=4 degrees with respect to the surface normal. Illumination of the molecular layer at 455 nm triggers the trans to cis isomerization which is associated with a pronounced change of the geometrical and electronic structure. The N1s to pi* transition of the central azo-bridge shifts by 0.45 +/- 0.05 eV to higher photon energy and the transition dipole moment (TDM) is tilted by 59 +/- 5 degrees with respect to the surface normal. The pi-system of one phenyl ring is tilted by about 30 degrees with respect to the surface normal, while the second ring plane is oriented nearly perpendicular to the surface. This reorientation is supported by a shift and broadening of the C-H resonances associated with the tert-butyl legs of the molecule. These findings support a configuration of the photo-switched TBA molecule on Au(111) which is comparable to the cis-isomer of the free molecule. In the photo-stationary state 53 +/- 5% of the TBA molecules are switched to the cis configuration. Thermal activation induces the back reaction to trans-TBA.