Due to the potential role of the gut microbiota and bile acids in the pathogenesis of both inflammatory bowel disease (IBD) and sporadic colorectal cancer, we aimed to determine whether these factors were associated with colorectal cancer in IBD patients. 215 IBD patients and 51 non-IBD control subjects were enrolled from 10 French IBD centers between September 2011 and July 2018. Fecal samples were processed for bacterial 16S rRNA gene sequencing and bile acid profiling. Demographic, clinical, endoscopic, and histological outcomes were recorded. Characteristics of IBD patients included: median age: 41.6 (IQR 22); disease duration 13.2 (13.1); 47% female; 21.9% primary sclerosing cholangitis; 109 patients with Crohn's disease (CD); 106 patients with ulcerative colitis (UC). The prevalence of cancer was 2.8% (6/215: 1 CD; 5 UC), high-grade dysplasia 3.7% (8/215) and low-grade dysplasia 7.9% (17/215). Lachnospira was decreased in IBD patients with cancer, while Agathobacter was decreased and Escherichia-Shigella increased in UC patients with any neoplasia. Bile acids were not associated with cancer or neoplasia. Unsupervised clustering identified three gut microbiota clusters in IBD patients associated with bile acid composition and clinical features, including a higher risk of neoplasia in UC in two clusters when compared to the third (relative risk (RR) 4.07 (95% CI 1.6-10.3, P < .01) and 3.56 (95% CI 1.4-9.2, P < .01)). In this multicentre observational study, a limited number of taxa were associated with neoplasia and exploratory microbiota clusters co-associated with clinical features, including neoplasia risk in UC. Given the very small number of cancers, the robustness of these findings will require assessment and validation in future studies.