The Prophet of Allah ﷺ said, "When one of you comes upon livestock, if their owner is present, let him ask his permission. If he grants it, let him milk and drink. If the owner is not there, let him call out three times. If anyone answers, let him ask his permission. Otherwise, let him milk and drink, but he must not carry any away."
حدثنا عياش بن الوليد الرقام حدثنا عبد الأعلى حدثنا سعيد عن قتادة عن الحسن
أن نبي الله ﷺ قال إذا أتى أحدكم على ماشية فإن كان فيها صاحبها فليستأذنه فإن أذن له فليحتلب وليشرب فإن لم يكن فيها فليصوت ثلاثا فإن أجابه فليستأذنه وإلا فليحتلب وليشرب ولا يحمل
[Its chain is daif]. Tirmidhi narrated it in the Book of Trade, in the chapter on what has been said about milking livestock without the owners' permission, hadith no. 1296, from the hadith of Abdul-Ala bin Abdul-Ala with this wording, and he said, hasan gharib sahih.Saeed bin Bashir is daif, Saeed bin Abu Aruba is a mudallis, and Qatada narrated with "an" (without an explicit connective phrase), assuming the chain leading to him is sound. The hadith has a daif corroborating witness.