How to quench unreacted sodium azide from reaction mixture?
Excess of sodium azide can be quenched using nitrous acid.

$$\ce{2NaNO2 + H2SO4 → 2HNO2 + Na2SO4}$$

$$\ce{2NaN3 + 2HNO2 → 3N2 + 2NO + 2NaOH}$$

For further reading, Click here.