Involved in nitrogen metabolism via ammonium assimilation (PubMed:24112767). Catalyzes the ATP-dependent biosynthesis of glutamine from glutamate and ammonia (PubMed:24112767). Also plays a key role in controlling the ammonia levels within infected host cells and so contributes to the pathogens capacity to inhibit phagosome acidification and phagosome-lysosome fusion (By similarity). Involved in cell wall biosynthesis via the production of the major component poly-L-glutamine (PLG) (PubMed:24112767). PLG synthesis in the cell wall occurs only in nitrogen limiting conditions and on the contrary high nitrogen conditions inhibit PLG synthesis (PubMed:24112767). ATP + L-glutamate + NH4(+) = ADP + H(+) + L-glutamine + phosphate Binds 2 Mg(2+) ions per subunit. When cellular nitrogen levels are high, the C-terminal adenylyl transferase (AT) of GlnE inhibits GlnA by covalent transfer of an adenylyl group from ATP to Tyr-406 (PubMed:15037612). Conversely, when nitrogen levels are low, the N-terminal adenylyl removase (AR) of GlnE activates GlnA by removing the adenylyl group by phosphorolysis (PubMed:15037612). The fully adenylated enzyme complex is inactive (Probable). Oligomer of 12 subunits arranged in the form of two hexagons. Belongs to the glutamine synthetase family.