What is the reaction mechanism of nitrogen leaving from diazo compounds?
The reaction is $\ce{S_N1}$


  
  
  Among the evidence for the $\ce{S_N1}$ mechanism with aryl cations as
  intermediates, is the following:
  
  
  The reaction rate is first order in diazonium salt and independent of the concentration of Y.
  When high concentrations of halide salts are added, the product is an aryl halide but the rate is independent of the concentration of the
  added salts.
  The effects of ring substituents on the rate are consistent with a unimolecular rate-determining cleavage.
  When reactions were run with substrate deuterated in the ortho position, isotope effects of $\sim 1.22$ were obtained. It is
  difficult to account for such high secondary isotope effects in any
  other way except that an incipient phenyl cation is stabilized by
  hyperconjugation, which is reduced when hydrogen is replaced by
  deuterium.
  
  
  
  
  
  That the first step is reversible cleavage was demonstrated by the observation that when  $\ce{Ar^{15}N+ #N}$ was the reaction species,
  recovered starting material contained not only $\ce{Ar^{15}N+ #N}$ but
  also $\ce{ArN^{+} #N}$This could arise only If the nitrogen breaks
  away from the ring and then returns. Additional evidence was obtained
  by treating $\ce{PhN+ #N^{15}}$ with unlabeled $\ce{N2}$ at various
  pressures. At $\pu{300 atm}$, the recovered product had lost $3 \%$ of
  the labeled nitrogen, indicating that $\ce{PhN2+}$ was exchanging with
  atmospheric $\ce{N2}$
  




Source: March's Advanced Organic Chemistry: Aromatic Substitution: Nucleophilic and Organometallic