Experimental N K-edge NEXAFS data of surface immobilized azide, 1,2,3-triazole and terpyridyl groups are interpreted with the help of DFT spectrum simulations. Assignments of π* resonances in experimental N K-edge NEXAFS spectra to nitrogen atoms within these functional groups have been made. The azide was immobilized on gold as the head group of a thiol SAM, 1,2,3-triazole was formed on this SAM by click reaction and terpyridyl groups were introduced as substituents of the acetylene used for the click reaction. For azide-terminated molecules, DFT spectrum simulations are found to be useful to find measurement conditions delivering experimental N K-edge NEXAFS data with negligible X-ray damage. The 1,2,3-triazole group is found to be rather stable under X-ray irradiation.