Hadithcore
Hadith #2110920

Narrated Rafi' bin Khadij (RA):

Allah's Messenger (ﷺ) said: "Whoever sows in the land of a people without their permission, he has no right to any of the crop. However, he is entitled to what he spent on it." [Reported by Ahmad and al-Arba'a except an-Nasa'i. at-Tirmidhi graded it Hasan (good).

وَعَنْ رَافِعِ بْنِ خَدِيجٍ ‏- رضى الله عنه ‏- قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ مَنْ زَرَعَ فِي أَرْضِ قَوْمٍ بِغَيْرِ إِذْنِهِمْ, فَلَيْسَ لَهُ مِنْ اَلزَّرْعِ شَيْءٌ, وَلَهُ نَفَقَتُهُ } رَوَاهُ أَحْمَدُ, وَالْأَرْبَعَةُ إِلَّا النَّسَائِيَّ, وَحَسَّنَهُ اَلتِّرْمِذِيُّ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 7, Hadith 141
Arabic/English book reference
Book 7, Hadith 900