# Reaction mechanism for the conversion of acyl hydrazide to acyl azide

How is an an acyl hydrazide converted into an acyl azide in the presence of $$\ce{HNO2}$$? According to me, the $$\ce{-NH2}$$ group of hydrazide will get converted into $$\ce{-N2+}$$ through $$\ce{HNO2}$$. However, I am unable to proceed after that.

You are correct acyl hydrazide can be converted into acyl azide by adding $$\ce{HNO2}$$ also you wrote that the $$\ce{NH2}$$ group of hydrazide will be diazotisated making a $$\ce{N2+}$$ group hence I am assuming that you know the mechanism, after diazotisation the adjacent $$\ce{N}$$ donate the lone pair to the $$\ce{N2+}$$ group making the final product as acyl azide.