We studied the structural and magnetic properties of 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 dcmagnetron 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-salt (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 in-situ XANES and NRS measurements, it appears that initial FeN layers grow in a 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.