  We studied the structural and magnetic properties of \textit{in-situ} grown
iron mononitride (FeN) thin films. Initial stages of film growth were trapped
utilizing synchrotron based soft x-ray absorption near edge spectroscopy
(XANES) at the N $K$-edge and nuclear resonant scattering (NRS). Films were
grown using dc-magnetron sputtering, separately at the experimental stations of
SXAS beamline (BL01, Indus 2) and NRS beamline (P01, Petra III). It was found
that the initial stages of film growth differs from the bulk of it. Ultrathin
FeN films, exhibited larger energy separation between the t$_{2g}$ and e$_g$
features and an intense e$_g$ feature in the N $K$-edge pattern. This indicates
that a structural transition is taking place from the rock-slat (RS)-type FeN
to zinc-blende(ZB)-type FeN when the thickness of films increases beyond 5\,nm.
The behavior of such N $K$-edge features correlates very well with the
emergence of a magnetic component appearing in the NRS pattern at 100\,K in
ultrathin FeN films. Combining the \textit{in-situ} XANES and NRS measurements,
it appears that initial FeN layers grow in RS-type structure having a magnetic
ground state. Subsequently, the structure changes to ZB-type which is known to
be non-magnetic. Observed results help in resolving the long standing debate
about the structure and the magnetic ground state of FeN.
