Mutualistic interactions with microbes have played a crucial role in the evolution and ecology of animal hosts. However, it is unclear what factors are most important in influencing particular host-microbe associations. While closely related animal species may have more similar microbiota than distantly related ones due to phylogenetic contingencies, social partnerships with other organisms, such as those in which one animal farms another, may also influence an organism's symbiotic microbiome. We studied a mutualistic network of Brachymyrmex and Lasius ants farming several honeydew-producing Prociphilus aphids and Rhizoecus mealybugs to test whether the mutualistic microbiomes of these interacting insects are primarily correlated with their phylogeny or with their shared social partnerships. Our results confirm a phylogenetic signal in the microbiomes of aphid and mealybug trophobionts, with each species harboring species-specific endosymbiont strains of Buchnera (aphids), Tremblaya and Sodalis (mealybugs), and Serratia (both mealybugs and aphids) despite being farmed by the same ants. This is likely explained by strict vertical transmission of trophobiont endosymbionts between generations. In contrast, the ants' microbiome is potentially shaped by their social partnerships, with ants that farm the same trophobionts also sharing strains of sugar-processing Acetobacteraceae bacteria, known from other honeydew-feeding ants and which likely reside extracellularly in the ants' guts. These ant-microbe associations are arguably more 'open' and subject to horizontal transmission or social transmission within ant colonies. These findings suggest that the role of social partnerships in shaping a host's symbiotic microbiome can be variable, and is likely dependent on how the microbes are transmitted across generations.