COVID-19 generates SARS-CoV-2-specific antibodies in immunocompetent individuals. However, in immunocompromised patients, the humoral immunity following infection may be impaired or absent. Recently, the assessment of cellular immunity to SARS-CoV-2, both following natural infection and vaccination, has contributed new knowledge regarding patients with low or no antibody responses. As part of a prospective cohort study which included hospitalized patients with COVID-19, we identified immunocompromised patients and compared them with age- and sex-matched immunocompetent patients regarding co-morbidities, biomarkers of COVID-19 and baseline viral load by real-time PCR in nasopharyngeal swabs. Spike and nucleocapsid antibody responses were analyzed at inclusion and after two weeks, six weeks and six months. Plasma immunoglobulin G (IgG) levels were quantified, lymphocyte phenotyping was performed, and SARS-CoV-2 specific CD4 and CD8 T cell responses after in vitro antigen stimulation were assessed at six months post infection. All patients showed IgG levels above or within reference limits. At six months, all patients had detectable SARS-CoV-2 anti-spike antibody levels. SARS-CoV-2 specific T cell responses were detected in 12 of 12 immunocompetent patients and in four of six immunocompromised patients. The magnitude of long-lived SARS-CoV-2 specific T cell responses were significantly correlated with the number of CD4 T cells and NK cells. Determining the durability of the humoral and cellular immune response against SARS-CoV-2 in immunocompromised individuals could be of importance by providing insights into the risk of re-infection and the need for vaccine boosters.