Oilseed rape residues are a crucial determinant of stem canker epidemiology as they support the sexual reproduction of the fungal pathogen Leptosphaeria maculans. The aim of this study was to characterize the impact of a resistance gene against L. maculans infection on residue microbial communities and to identify microorganisms interacting with this pathogen during residue degradation. We used near‐isogenic lines to obtain healthy and infected host plants. The microbiome associated with the two types of plant residues was characterized by metabarcoding. A combination of linear discriminant analysis and ecological network analysis was used to compare the microbial communities and to identify microorganisms interacting with L. maculans. Fungal community structure differed between the two lines at harvest, but not subsequently, suggesting that the presence/absence of the resistance gene influences the microbiome at the base of the stem whilst the plant is alive, but that this does not necessarily lead to differential colonization of the residues by fungi. Direct interactions with other members of the community involved many fungal and bacterial amplicon sequence variants (ASVs). L. maculans appeared to play a minor role in networks, whereas one ASV affiliated to Plenodomus biglobosus (synonym Leptosphaeria biglobosa) from the Leptosphaeria species complex may be considered a keystone taxon in the networks at harvest. This approach could be used to identify and promote microorganisms with beneficial effects against residue‐borne pathogens and, more broadly, to decipher the complex interactions between multispecies pathosystems and other microbial components in crop residues.