Artificially constructed oxide heterointerfaces have attracted much attention. Herein, the novel all-perovskite p-n heterojunction composed of a colossal magnetoresistive manganite La 0.7 Sr 0.3 MnO 3 (LSMO) and an n-type transparent semiconducting BaSnO 3 (BSO) is designed via optimizing the growth condition. This LSMO/BSO p-n junction exhibits good rectification with a forward-to-reverse ratio of 275 at 1 V, high photo detection capability with a photo-to-dark current of 581.9 at À0.5 V, high ultraviolet light sensitivity with a UV (360 nm)-to-visible (532 nm) ratio of $2.4 Â 10 3 , and a significantly magneto-tunable photocurrent with a variation ratio of $1.25 % under 532 nm illumination and 0.5 T magnetic field. As a result, combining synergistically the functionality of diode and magnetically tunable photo detector, the LSMO/BSO p-n junction is a promising candidate for advanced magneto-optoelectronic devices.In this work, all-perovskite heterostructures composed of a correlated electron oxide La 0.7 Sr 0.3 MnO 3 (LSMO) and a transparent semiconducting BaSnO 3 (BSO) were deposited on SrTiO 3 (001) substrates. Through adopting appropriate experimental parameters, a diode-like behavior was observed in LSMO/BSO junction, which exhibited good rectification with a forward-toreverse ratio of 275 at 1 V, high photo detection capability with a photo-to-dark current of 581.9 at À0.5 V, high ultraviolet light sensitivity with a UV (360 nm)-to-visible (532 nm) ratio of %2.4 Â 10 3 , and significantly magneto-tunable photocurrent with a variation ratio of %1.25% under 532 nm illumination and 0.5 T magnetic field. As a result, combining synergistically the functionality of diode and magnetically tunable photo detector, the LSMO/BSO p-n junction is a promising candidate for advanced magneto-optoelectronic devices.