Endophytes inhabit plant tissues, offering various benefits to their hosts.Understanding their roles in sustainable agriculture is a key focus of research. Using16S rRNA gene and fungal specific ITS2 region amplicon sequencing, we investigatedhow 11 different potato cultivars and 3 different growing conditions influence thediversity of microbial endophytes in potato roots. We compared plants grown on 2different soils in greenhouse conditions and plantlets grown in agar medium, i.e., invitro, representing the planting material without the effect of the soil microbiome. Ourstudy reveals that growing conditions significantly influenced the alpha- and beta-diversity of endophytic bacteria. In plants grown in soils, the bacterial endophyticcommunity was mainly represented by the Pseudomonodacae family, whereas for invitro plants, the Paenibacillaceae, a spore-forming bacteria family, was the mainPage 1 of 50representative. The fungal community comprised many possible fungal pathogenssuch as Colletotrichum, Fusarium and Verticillium. For the endophytic fungi both soiltypes and cultivars affected fungal diversity, a stronger effect for cultivars was seen forfungi as compared to bacteria.Overall, our findings indicate that endophytic bacteria exhibit strong recruitmentpotential from soil communities, while the identity of cultivars has also influenced fungaldynamics communities. These findings shed light on the intricate interactions amongpotato cultivars and soil microbiomes, which can affect the design of sustainableagricultural strategies.