ImportanceThe benefit of primary and booster vaccination in people who experienced prior SARS-CoV-2 infection remains unclear.ObjectiveTo estimate the effectiveness of a primary (two-dose) and booster (third dose) vaccination against Omicron infection among previously infection people.DesignTest-negative case-control study.SettingYale New Haven Health System facilities serving southern Connecticut communities.ParticipantsVaccine eligible people who received SARS-CoV-2 RT-PCR testing between November 1, 2021, and January 31, 2022.ExposureCOVID-19 mRNA primary and booster vaccination.Main Outcomes and MeasuresWe conducted two analyses, each with an outcome of Omicron BA.1 variant infection (S-gene target failure defined) and each stratified by prior SARS-CoV-2 infection status. We estimated the effectiveness of primary vaccination during the period before and during booster eligibility (14-149 and ≥150 days, respectively, after 2nd dose) and of booster vaccination (≥14 days after booster dose). To test whether booster vaccination reduced the risk of infection beyond that of the primary series, we compared the odds among boosted and booster eligible people.ResultsOverall, 10,676 cases and 119,397 controls were included (median age: cases: 35 years, controls: 39 years). Among cases and controls, 6.1% and 7.8% had a prior infection. The effectiveness of primary vaccination 14-149 days after 2nd dose was 36.1% (95% CI, 7.1-56.1%) and 28.5% (95% CI, 20.0-36.2%) for people with and without prior infection, respectively. The effectiveness of booster vaccination was 45.8% (95% CI, 20.0-63.2%) and 56.9% (95% CI, 52.1-61.2%) in people with and without prior infection, respectively. The odds ratio comparing boosted and booster eligible people with prior infection was 0.83 (95% CI, 0.56-1.23), whereas the odds ratio comparing boosted and booster eligible people without prior infection was 0.51 (95% CI, 0.46-0.56).Conclusions and RelevancePrimary vaccination provided significant but limited protection against Omicron BA.1 infection among people with and without prior infection. While booster vaccination was associated with additional protection in people without prior infection, it was not associated with additional protection among people with prior infection. These findings support primary vaccination in people regardless of prior infection status but suggest that infection history should be considered when evaluating the need for booster vaccination.