Essential bifunctional enzyme that catalyzes both the N-deacetylation and the N-sulfation of glucosamine (GlcNAc) of the glycosaminoglycan in heparan sulfate. Modifies the GlcNAc-GlcA disaccharide repeating sugar backbone to make N-sulfated heparosan, a prerequisite substrate for later modifications in heparin biosynthesis (By similarity). 3'-phosphoadenylyl sulfate + alpha-D-glucosaminyl-[heparan sulfate](n) = adenosine 3',5'-bisphosphate + 2 H(+) + N-sulfo-alpha-D-glucosaminyl-[heparan sulfate](n) Glycan metabolism; heparan sulfate biosynthesis. Glycan metabolism; heparin biosynthesis. Monomer. Belongs to the sulfotransferase 1 family. NDST subfamily.