Involved in the biosynthesis of the maltose-1-phosphate (M1P) building block required for alpha-glucan production by the key enzyme GlgE (PubMed:18808383, PubMed:27513637). Catalyzes the formation of an alpha-1,4 linkage between glucose from ADP-glucose and glucose 1-phosphate (G1P) to yield maltose-1-phosphate (M1P) (PubMed:27513637). Also able to catalyze the elongation of the non-reducing ends of glycogen, maltodextrin and maltoheptaose using ADP-glucose as sugar donor, however the rate of the reaction appears to be too low to be physiologically relevant (PubMed:27513637). GlgM is also able to use UDP-glucose as sugar donor with G1P, however, it is less efficient than with ADP-glucose (PubMed:27513637). UDP-glucose is not used as sugar donor when glycogen is used as acceptor (PubMed:27513637). ADP-alpha-D-glucose + alpha-D-glucose 1-phosphate = ADP + alpha-maltose 1-phosphate + H(+) Inhibited at high G1P concentrations. kcat is 97.9 sec(-1) for G1P as substrate (with 0.5 mM of ADP-glucose). kcat is 80.6 sec(-1) for G1P as substrate (with 4 mM of ADP-glucose). kcat is 39 sec(-1) for G1P as substrate (with 0.1 mM of ADP-glucose). kcat is 29.2 sec(-1) for ADP-glucose as substrate (with 1 mM of G1P). kcat is 20 sec(-1) for ADP-glucose as substrate (with 0.25 mM of G1P). kcat is 19.8 sec(-1) for ADP-glucose as substrate (with 2.5 mM of G1P). kcat is 15.4 sec(-1) for ADP-glucose as substrate (with 4 mM of G1P). kcat is 0.09 sec(-1) for rabbit liver glycogen as substrate. kcat is 0.014 sec(-1) for alpha-glucan as substrate. Capsule biogenesis; capsule polysaccharide biosynthesis. Glycan biosynthesis; glycogen biosynthesis. Inactivation of glgM affects the production of extracellular alpha-glucan (two-fold reduction), but not that of intracellular glycogen and 6-O-methylglucosyl lipopolysaccharides (MGLP) (PubMed:18808383, PubMed:27513637). Cells lacking this gene are also impaired in their ability to persist in both the spleen and the lungs of mice (PubMed:18808383). Combined inactivation of both glgM and ostA is lethal, potentially due to accumulation of toxic levels of ADP-glucose (PubMed:27513637). Combined inactivation of both glgM and treS results in absence of alpha-glucan (PubMed:27513637). Maltose-1-phosphate (M1P) is generated by two alternative routes: the TreS-Pep2 branch and the GlgC-GlgM branch, however it seems that TreS-Pep2 branch provides most of M1P for the GlgE pathway in M.tuberculosis. Attempts to disrupt both the Rv3032 gene and glgA in order to create a mutant simultaneously deficient in both alpha-1,4-glucosyltransferases turned out to be unsuccessful. Thus, M.tuberculosis H37Rv requires a functional copy of at least one of these two genes for growth. Belongs to the glycosyltransferase group 1 family.