This repository contains an anonymised participant-level dataset from a study of 673 people with diabetes attending primary care in Khayelitsha, Cape Town, South Africa. Variables include demographics, diabetes history and treatment, comorbidities, TB symptoms, chest X-ray findings, CAD4TB scores, HbA1c, HIV status, and Xpert MTB/RIF Ultra results. The dataset can support replication of the associated analyses and further research on TB screening in people with diabetes. Ethical approval was obtained from the University of Cape Town and University College London, and all participants provided written informed consent.