Background: Patients with inflammatory bowel disease (IBD) treated with anti-TNF therapy exhibit attenuated humoral immune responses to vaccination against SARS-CoV-2. The gut microbiota and its functional metabolic output, which are perturbed in IBD, play an important role in shaping host immune responses. We explored whether the gut microbiota and metabolome could explain variation in anti-SARS-CoV-2 vaccination responses in immunosuppressed IBD patients., Methods: Faecal and serum samples were prospectively collected from infliximab-treated patients with IBD in the CLARITY-IBD study undergoing vaccination against SARS-CoV-2. Antibody responses were measured following two doses of either ChAdOx1 nCoV-19 or BNT162b2 vaccine. Patients were classified as having responses above or below the geometric mean of the wider CLARITY-IBD cohort. 16S rRNA gene amplicon sequencing, nuclear magnetic resonance (NMR) spectroscopy and bile acid profiling with ultra-high-performance liquid chromatography mass spectrometry (UHPLC-MS) were performed on faecal samples. Univariate, multivariable and correlation analyses were performed to determine gut microbial and metabolomic predictors of response to vaccination., Findings: Forty-three infliximab-treated patients with IBD were recruited (30 Crohn's disease, 12 ulcerative colitis, 1 IBD-unclassified; 26 with concomitant thiopurine therapy). Eight patients had evidence of prior SARS-CoV-2 infection. Seventeen patients (39.5%) had a serological response below the geometric mean. Gut microbiota diversity was lower in below average responders (p = 0.037). Bilophila abundance was associated with better serological response, while Streptococcus was associated with poorer response. The faecal metabolome was distinct between above and below average responders (OPLS-DA R 2 X 0.25, R 2 Y 0.26, Q 2 0.15; CV-ANOVA p = 0.038). Trimethylamine, isobutyrate and omega-muricholic acid were associated with better response, while succinate, phenylalanine, taurolithocholate and taurodeoxycholate were associated with poorer response., Interpretation: Our data suggest that there is an association between the gut microbiota and variable serological response to vaccination against SARS-CoV-2 in immunocompromised patients. Microbial metabolites including trimethylamine may be important in mitigating anti-TNF-induced attenuation of the immune response., Funding: JLA is the recipient of an NIHR Academic Clinical Lectureship (CL-2019-21-502), funded by Imperial College London and The Joyce and Norman Freed Charitable Trust. BHM is the recipient of an NIHR Academic Clinical Lectureship (CL-2019-21-002). The Division of Digestive Diseases at Imperial College London receives financial and infrastructure support from the NIHR Imperial Biomedical Research Centre (BRC) based at Imperial College Healthcare NHS Trust and Imperial College London. Metabolomics studies were performed at the MRC-NIHR National Phenome Centre at Imperial College London; this work was supported by the Medical Research Council (MRC), the National Institute of Health Research (NIHR) (grant number MC_PC_12025) and infrastructure support was provided by the NIHR Imperial Biomedical Research Centre (BRC). The NIHR Exeter Clinical Research Facility is a partnership between the University of Exeter Medical School College of Medicine and Health, and Royal Devon and Exeter NHS Foundation Trust. This project is supported by the National Institute for Health Research (NIHR) Exeter Clinical Research Facility. The views expressed are those of the authors and not necessarily those of the NIHR or the UK Department of Health and Social Care., Competing Interests: Declaration of interests Dr Saifuddin has received travel expense support from Janssen. Dr Lin reports non-financial support from Pfizer, non-financial support from Ferring, outside the submitted work. Dr. Kennedy reports grants from AbbVie, Biogen, Celgene, Celtrion, Galapagos, MSD, Napp, Pfizer, Pharmacosmos, Roche and Takeda, consulting fees from Amgen, Bristol-Myers Squibb, Falk, Janssen, Mylan, Pharmacosmos, Galapagos, Takeda and Tillotts, personal fees from Allergan, Celltrion, Falk, Ferring, Janssen, Pharmacosmos, Takeda, Tilllotts, Galapagos, and support for attending meetings from AbbVie, Falk and Janssen outside the submitted work. Prof. Sebastian reports grants from Takeda, Abbvie, Tillots Pharma, Janssen, Pfizer, Biogen and personal fees from Takeda, Abbvie, Janssen, Pharmacocosmos, Biogen, Pfizer, Tillots Pharma and Falk Pharma, outside the submitted work. Dr Hart reports payment or honoraria for lectures, presentations, speakers bureaus, manuscript writing or educational events from AbbVie, AZ, Atlantic, Bristol-Myers Squibb, Celltrion, Falk, Galapogos, Janssen, MSD, Napp Pharmaceuticals, Pfizer, Pharmacosmos, Shire and Takeda and Global Steering Committee for Genentech, support for attending meetings from Abbvie, Takeda and Janssen, and Participation on a Data Safety Monitoring Board or Advisory Board for AbbVie, AZ, Atlantic, Bristol-Myers Squibb, Galapogos, Janssen, Pfizer and Takeda. Prof. Lees reports a Future Leaders Fellow award from UKRI, personal consulting fees from Galapagos, Abbvie, Takeda, Pfizer, Janssen, Iterative Scopes and institutional consulting fees from Trellus Health, personal fees from Galapagos, Abbvie, Takeda, Pfizer, Janssen, GSK, Gilead, Fresnius Kabi, Ferring and Dr Falk, and support for attending meetings from Galapagos, Abbvie, Takeda, Pfizer, Janssen, GSK, Gilead, Fresnius Kabi, Ferring and Dr Falk. Dr. Goodhand reports grants from F. Hoffmann-La Roche AG, grants from Biogen Inc, grants from Celltrion Healthcare, grants from Galapagos NV, non-financial support from Immundiagnostik, during the conduct of the study. Prof. Ahmad reports grant funding from Pfizer to his institution to deliver this study, grants from Celltrion, Roche, Takeda, Biogen and Galapagos and honoraria for lectures from Takeda and Roche, outside the submitted work. Dr Powell has received research grant(s) from Bristol Myers Squibb outside the submitted work. Dr. Powell reports personal fees from Takeda, Janssen, Pfizer, Bristol-Myers Squibb, Abbvie, Roche, Lilly, Allergan, and Celgene, outside the submitted work; Dr. Powell has served as a speaker/advisory board member for Abbvie, Allergan, Bristol Myers Squibb, Celgene, Falk, Ferring, Janssen, Pfizer, Tillotts, Takeda and Vifor Pharma. The following authors have nothing to declare: Dr Alexander, Dr Ibraheim, Claire Bewshea, Rachel Nice, Dr Liu, Dr Mullish, Dr Danckert, Melissa Torkizadeh, Jesús Miguéns Blanco, Lauren A Roberts, Hemanth Prabhudev, Caroline Sands, Verena Horneffer-van der Sluis, Matthew Lewis, Professor Teare, Martin Olbei, Tamas Korcsmaros and Professor Marchesi., (Copyright © 2022 The Author(s). Published by Elsevier B.V. All rights reserved.)