Pollinators face many stressors, including reduced floral diversity. A low-diversity diet can impair organisms' ability to cope with additional stressors, such as pathogens, by altering the gut microbiome and/or immune function, but these effects are understudied for most pollinators. We investigated the impact of pollen diet diversity on two ecologically and economically important generalist pollinators, the social bumble bee (Bombus impatiens) and the solitary alfalfa leafcutter bee (Megachile rotundata). We experimentally tested the effect of one-, two-, or three-species pollen diets on gut bacterial communities in both species, and the melanization immune response in B. impatiens. Pollen diets included dandelion (Taraxacum officinale), staghorn sumac (Rhus typhina), and hawthorn (Crataegus sp.) alone, each pair-wise combination, or a mix of all three species. We fed bees their diet for 7 days and then dissected out guts and sequenced 16S rRNA gene amplicons to characterize gut bacterial communities. To assess melanization in B. impatiens, we inserted microfilament implants into the bee abdomen and measured melanin deposition on the implant. We found that pollen diet did not influence gut bacterial communities in M. rotundata. In B. impatiens, pollen diet composition, but not diversity, affected gut bacterial richness in older, but not newly-emerged bees. Pollen diet did not affect the melanization response in B. impatiens. Our results suggest that even a monofloral, low-quality pollen diet such as dandelion can support diverse gut bacterial communities in captive-reared adults of these bee species. These findings shed light on the effects of reduced diet diversity on bee health.