Inclusion Criteria:  Metastatic, recurrent, or unresectable solid tumor with a pathogenic, or presumed pathogenic, somatic mutation of one of the following homologous recombination deficiency (HRD) gene mutations:  • BRCA1, BRCA2, ATM, RAD51B, RAD51C, RAD54L, RAD51D, FANC/BRIP1, FANCI, FANCL, FANCN(PALB2), BARD1, CHEK1, CHEK2, CDK12, or PPP2R2A.  Participant must have an Eastern Cooperative Oncology Group (ECOG) performance status of ≤ 1 Participant must be ≥ 18 years of age  Participant must have adequate organ function, defined as follows:  Absolute neutrophil count ≥ 1,500/µL Platelets ≥ 100,000/µL Hemoglobin ≥ 9 g/dL Serum creatinine ≤ 1.5 x upper limit of normal (ULN) or calculated creatinine clearance ≥ 60mL/min using the Cockcroft-Gault equation Total bilirubin ≤ 1.5 x ULN (≤2.0 in patients with known Gilberts syndrome) OR direct bilirubin ≤ 1 x ULN Aspartate aminotransferase and alanine aminotransferase ≤ 2.5 x ULN unless liver metastases are present, in which case they must be ≤ 5 x ULN International normalized ratio (INR) or prothrombin time (PT) ≤1.5× ULN unless patient is receiving anticoagulant therapy as long as PT or partial thromboplastin (PTT) is within therapeutic range of intended use of anticoagulants. Activated partial thromboplastin time (aPTT) ≤1.5× ULN unless patient is receiving anticoagulant therapy as long as PT or PTT is within therapeutic range of intended use of anticoagulants Participant must agree to not donate blood during the study or for 90 days after the last dose of study treatment.  Female participant has a negative serum pregnancy test within 72 hours prior to taking study treatment if of childbearing potential and agrees to use a highly effective method of contraception from screening through 180 days after the last dose of study treatment, or is of non-childbearing potential. Non-childbearing potential is defined as follows (by other than medical reasons):  ≥45 years of age and has not had menses for >1 year Patients who have been amenorrhoeic for <2 years without history of a hysterectomy and oophorectomy must have a follicle stimulating hormone value in the postmenopausal range upon screening evaluation Post-hysterectomy, post-bilateral oophorectomy, or post-tubal ligation. Documented hysterectomy or oophorectomy must be confirmed with medical records of the actual procedure or confirmed by an ultrasound. Tubal ligation must be confirmed with medical records of the actual procedure, otherwise the patient must be willing to use an adequate barrier method throughout the study, starting with the screening visit through 180 days after the last dose of study treatment. See Section 5.4 for a list of acceptable birth control methods. Information must be captured appropriately within the site's source documents. Note: Abstinence is acceptable if this is the established and preferred contraception for the patient.  h. Male participant agrees to use a highly effective method of contraception (see Section 5.4 for a list of acceptable birth control methods) starting with the first dose of study treatment through 180 days after the last dose of study treatment. Note: Abstinence is acceptable if this is the established and preferred contraception for the patient.  i. Human immunodeficiency virus (HIV)-infected patients on effective anti-retroviral therapy with documented undetectable viral load and CD 4 count of >350 within 6 months of the first dose of study treatment are eligible for this trial.  j. If an appropriate archival tumor tissue sample is not available, patient is willing to undergo a pre-treatment tumor biopsy.  k. Participant must be able to understand the study procedures and agree to participate in the study by providing written informed consent  Exclusion Criteria:  Participant must not be simultaneously enrolled in any interventional clinical trial  Patients with the following malignancies will be excluded:  Prostate cancer Ovarian, breast, and pancreatic patients with known germline BRCA1 or BRCA2 mutation Platinum sensitive ovarian cancer (defined as recurrence > 6 months from last platinum agent), unless platinum intolerant. Participant must not have had major surgery ≤ 3 weeks prior to initiating protocol therapy and participant must have recovered from any surgical effects. Participant must not have received investigational therapy ≤ 4 weeks, or within a time interval less than at least 5 half-lives of the investigational agent, whichever is shorter, prior to initiating protocol therapy. Participant has had radiation therapy encompassing >20% of the bone marrow within 2 weeks; or any radiation therapy within 1 week prior to Day 1 of protocol therapy. Participant must not have a known hypersensitivity to niraparib and dostarlimab components or excipients. Participant must not have received a transfusion (platelets or red blood cells) ≤ 4 weeks prior to initiating protocol therapy. Participant must not have received colony stimulating factors (eg, granulocyte colony-stimulating factor, granulocyte macrophage colony stimulating factor, or recombinant erythropoietin) within 4 weeks prior initiating protocol therapy. Participant has had any known Grade 3 or 4 anemia, neutropenia or thrombocytopenia due to prior chemotherapy that persisted > 4 weeks and was related to the most recent treatment. Participant must not have any known history of myelodysplastic syndrome (MDS) or acute myeloid leukemia (AML) Participant must not have a serious, uncontrolled medical disorder, nonmalignant systemic disease, or active, uncontrolled infection. Examples include, but are not limited to, uncontrolled ventricular arrhythmia, recent (within 90 days) myocardial infarction, uncontrolled major seizure disorder, unstable spinal cord compression, superior vena cava syndrome, or any psychiatric disorder that prohibits obtaining informed consent Participant must not have had diagnosis, detection, or treatment of another type of cancer ≤ 2 years prior to initiating protocol therapy (except basal or squamous cell carcinoma of the skin and cervical cancer that has been definitively treated)  Participant must not have known leptomeningeal disease, carcinomatous meningitis, symptomatic brain metastases, or radiologic signs of CNS hemorrhage.  • Patients with a history of brain metastases may be enrolled if the metastases are fully treated with either resection or irradiation, the patient is asymptomatic for 4 weeks, and the patient is off steroids.  Patient experienced ≥ Grade 3 immune-related AE with prior immunotherapy, with the exception of non-clinically significant lab abnormalities. Participant has a diagnosis of immunodeficiency or has received systemic steroid therapy at a dose of >10 prednisone or its equivalent or any other form of immunosuppressive therapy within 7 days prior to initiating protocol therapy. Participant has known active hepatitis B (e.g., hepatitis B surface antigen [HBsAg] reactive) or hepatitis C (e.g., hepatitis C virus [HCV] ribonucleic acid [qualitative] is detected). Participant has an active autoimmune disease that has required systemic treatment in the past 2 years (ie, with use of disease-modifying agents, corticosteroids, or immunosuppressive drugs). Replacement therapy (eg, thyroxine, insulin, or physiologic corticosteroid replacement therapy for adrenal or pituitary insufficiency, etc.) is not considered a form of systemic treatment. Participant must not have a history of interstitial lung disease. Participant has received a live vaccine within 14 days of initiating protocol therapy.