International audienceContext. Evolutionary models are widely used to infer the mass of stars, brown dwarfs, and giant planets. Their predictions are thought to be less reliable at young ages (< 200 Myr) and in the low-mass regime (< 1 M⊙). GJ 2060 AB and TWA 22 AB are two rare astrometric M-dwarf binaries, respectively members of the AB Doradus (AB Dor) and Beta Pictoris (β Pic) moving groups. As their dynamical mass can be measured to within a few years, they can be used to calibrate the evolutionary tracks and set new constraints on the age of young moving groups.Aims. We provide the first dynamical mass measurement of GJ 2060 and a refined measurement of the total mass of TWA 22. We also characterize the atmospheric properties of the in...