Treatment of rheumatic diseases requires immunomodulatory agents which can compromise antibody production. However, even in case of agents directly targeting B cells, a minority of patients develop hypogammaglobulinaemia, suggesting a genetic predisposition, which has not been investigated so far. The phenotypic overlap between primary immunodeficiency disorders (PIDs) and rheumatic diseases suggests a shared genetic basis, especially in case of patients with rheumatic diseases with hypogammaglobulinaemia.1008 patients with rheumatic diseases visiting the outpatient clinics of the Hannover University Hospital were screened for hypogammaglobulinaemia. Those with persistent hypogammaglobulinaemia and an equal number of patients without it underwent targeted next-generation sequencing, searching for variations in genes linked with hypogammaglobulinaemia in the context of PIDs.We identified 33 predicted pathogenic variants in 30/64 (46.9%) patients with persistent secondary hypogammaglobulinaemia. All 33 variants were monoallelic and 10 of them in 10/64 (15.6%) patients were found in genes associated with autosomal dominant PIDs. 2/64 (3.1%) patients harboured variants which were previously reported to cause PIDs. In the group without hypogammaglobulinaemia we identified seven monoallelic variants in 7/64 (10.9%), including a variant in a gene associated with an autosomal dominant PID.Approximately half of patients with persistent secondary hypogammaglobulinaemia harboured at least a variant in a PID gene. Despite the fact that previous immunomodulatory treatment is an exclusion criterion in the diagnosis of PIDs, we identified genetic variants that can account for PID in patients with clear rheumatic phenotypes who developed hypogammaglobulinaemia after the introduction of immunomodulatory treatment. Our data suggest the common genetic causes of primary and secondary hypogammaglobulinaemia.