The taxonomically diverse phyllosphere fungi inhabit leaves of plants. Thus, apart from the fungi's dispersal capacities and environmental factors, the assembly of the phyllosphere community associated with a given host plant depends on factors encoded by the host's genome. The host genetic factors and their influence on the assembly of phyllosphere communities under natural conditions are poorly understood, especially in trees. Recent work indicates that Norway spruce (Picea abies) vegetative buds harbour active fungal communities, but these are hitherto largely uncharacterized. This study combines internal transcribed spacer sequencing of the fungal communities associated with dormant vegetative buds with a genome‐wide association study (GWAS) in 478 unrelated Norway spruce trees. The aim was to detect host loci associated with variation in the fungal communities across the population, and to identify loci correlating with the presence of specific, latent, pathogens. The fungal communities were dominated by known Norway spruce phyllosphere endophytes and pathogens. We identified six quantitative trait loci (QTLs) associated with the relative abundance of the dominating taxa (i.e., top 1% most abundant taxa). Three additional QTLs associated with colonization by the spruce needle cast pathogen Lirula macrospora or the cherry spruce rust (Thekopsora areolata) in asymptomatic tissues were detected. The identification of the nine QTLs shows that the genetic variation in Norway spruce influences the fungal community in dormant buds and that mechanisms underlying the assembly of the communities and the colonization of latent pathogens in trees may be uncovered by combining molecular identification of fungi with GWAS.