The Prophet of Allah ﷺ forbade milking people's livestock without their permission.
حدثنا معتمر حدثنا عبيد الله عن نافع
أن نبي الله ﷺ نهى أن تحلب مواشي الناس إلا بإذنهم
No references are available.
Its isnad is sahih, and Bukhari and Muslim narrated it at greater length, as in Muntaqa 4664. The longer version will come later at 4505.