Plants form a close bond with a vast range of microorganisms. In fact, this microbiome could be viewed as an extended phenotype of the plant genome enhancing plants’ ability to cope with environmental stress. To understand this connection, researchers recently examined the microbiome of the model legume Medicago truncatula. They found that bacterial diversity decreased between external and internal plant compartments and that microbiome composition was shaped by strong interactions between compartment type, soil, and plant genotype with the microbial composition of external compartments driven by soil origin and the microbial composition of internal compartments driven by host genetics. All compartments were dominated by Ensifer, the nitrogen-fixing bacteria that form root nodule symbiosis with M. truncatula. While the study looked at only three plant genotypes, larger mapping studies could help resolve the plant genes that control microbiomes, and controlled inoculation studies could help isolate the effects of individual microbes and microbial communities. Clarifying the complex interactions between plant hosts and their microbiomes could help boost environmental sustainability, agriculture, and conservation efforts.