A toluene solution of 4,4′-methylenebis(2,6-diethylaniline) was spin coated on Si wafers. The samples were derivatized with pentafluorobenzaldehyde (PFB) in order to determine the primary amino groups on the surface. XPS C 1s and N 1s and C and N K-edge NEXAFS of underivatized and derivatized films were carefully analyzed. The result was that after 10 min of exposure the gas–surface reaction was already completed. A reasonable derivatization reaction yield in the order of 90% is derived from the experiments. This number correlates well to a reaction yield obtained by a wet chemical approach. Copyright © 2008 John Wiley & Sons, Ltd.