Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference of our reports dated November 13, 2023, 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, 2023, into the Registration Statement (Form N-2, File No. 333-269628), filed with the Securities and Exchange Commission.
/s/ Ernst & Young LLP
Los Angeles, CA
November 13, 2023