Perturbations to the composition of resident microbial communities (dysbiosis) is emerging as an important element of intestinal disease, however little is known about the mechanisms by which beneficial communities are selected in the gut. Here we report that recognition of commensal products by T cells is an important pathway for IgA specificity and microbiota selection. We find that commensal driven T cell responses lead to proper intestinal T follicular helper cell (TFH) development and germinal center formation. Defects in this pathway result in poor IgA-producing plasma B cell formation and mucosal antibody production. Despite these deficiencies, host IgA more robustly targets the microbiota, resulting in alterations to community composition. Animals that lack T cell sensing of microbes, are more susceptible to intestinal disease that can be rescued by microbiota transfer. Thus, an intestinal T cell can directly respond to environmental cues and dynamically regulate microbial community structure providing the host a mechanism to prevent dysbiosis.