EX-23.1 3 exhibit231-consentofindepe.htm EX-23.1 Document
Exhibit 23.1
Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in the Registration Statement (Form N-2 No. 333-234798) of Oaktree Specialty Lending Corporation and in the related Prospectus of our reports dated November 15, 2021, with respect to the consolidated financial statements of Oaktree Specialty Lending Corporation, and the effectiveness of internal control over financial reporting of Oaktree Specialty Lending Corporation, included in this Annual Report (Form 10-K) for the year ended September 30, 2021.

/s/ Ernst & Young LLP

Los Angeles, CA
November 15, 2021