  We present a study of the cool gas ($\approx 10^4$ K) traced by MgII
absorptions around groups of galaxies in the MEGAFLOW survey. Using a
combination of two algorithms we blindly identify 32 groups of more than 5
galaxies at $0.3 < z < 1.5$ with $10.7 < \log_{10}(M/\rm M_{\odot}) < 13.7$.
Among them 26 can be used to study potential counterpart MgII absorptions. We
report that 21 out of the total 120 MgII absorption systems present in MEGAFLOW
are associated with groups. We observe that the MgII rest-frame equivalent
width ($W^{2796}_r$) drops at an impact parameter of $\approx 150$ projected
kpc from the closest galaxy and $\approx$ one virial radius from the identified
group center indicating that MgII halos scale with the mass of the groups.The
impact parameter where the covering fraction exceeds $50\%$ is $\log_{10}(b/\rm
kpc) = 2.17 \pm 0.47$ $(2 \sigma)$ and $(b/R_{\rm vir}) = 1.67 \pm 0.98$, which
is $\approx 3$ times larger than for field galaxies ($\log_{10}(b/\rm
kpc)=1.67\pm0.15$). Finally, we estimate the cool gas column density profile in
groups (from the $W^{2796}_r$) and show that its shape follows closely the
typical dark matter column density profile for halos at similar redshift and
masses.
