While most insect herbivores are selective feeders, a small proportion of them feed on a wide range of plants. This polyphagous habit requires overcoming a remarkable array of defenses, which often necessitates an adaptation period. Efforts for understanding the mechanisms involved mostly focus on the insect's phenotypic plasticity. Here, we hypothesized that the adaptation process might partially rely on transient associations with bacteria. To test this, we followed in a field-like experiment, the adaptation process of Bemisia tabaci, a generalist sap feeder, to pepper (a less-suitable host), after switching from watermelon (a suitable host). Amplicon sequencing of 16S rRNA transcripts from hundreds of dissected guts revealed the presence of active "core" and "transient" bacterial communities, dominated by the phyla Proteobacteria, Actinobacteria, and Firmicutes, and increasing differences between populations grown on watermelon and pepper. Insects grown on pepper for over two generations presented a significant increase in specific genera, mainly Mycobacterium, with a predicted enrichment in degradative pathways of xenobiotics and secondary metabolites. This result correlated with a significant increase in the insect's survival on pepper. Taken together, our findings suggest that gut-associated bacteria can provide an additional flexible metabolic "tool-box" to generalist sap feeders for facilitating a quick host switching process.