The precise mechanisms that allow animals and phototrophic organisms to form a stable photosymbiotic relationship are still unknown. While previous studies focused on genomic adaptations of the animal host, more recent research looked into the role of bacteria in photosymbiosis. Here, we analyzed the core microbiome of the sea slug Berghia stephanieae and its food source Exaiptasia diaphana to understand if the microbiome and the linked bacterial metabolic pathways differ between unstable and stable photosymbiosis. This sea slug feeds solely on the model cnidarian E. diaphana and steals their photobionts which the slug can only maintain for a week. We additionally examined the influence of light and starvation stress on the slug’s bacterial composition, which are common experimental set-ups to elucidate the photosymbiotic relationship in the slugs. Our results show that the core microbiome of B. stephanieae and E. diaphana differed significantly suggesting that the slug’s microbiome is not obtained from its food source or the water column and indicates a vertical transmission. Further, differences in metabolic pathways imply that the microbiome of B. stephanieae does not support a stable photosymbiosis due to an insufficient nitrogen cycle on part of the photobiont. Starving the slugs induced a shift towards an increased abundance of potential pathogens and led to a downregulation in the sulphur cycle. Yet, starvation in darkness resulted in the depletion of most bacteria and induced a metabolic switch toward bacterial nitrogen fixation. This emphasizes that different holobiont members contribute to essential nutrient cycles, and it is important to look beyond the photobiont to understand the sea slug holobiont.