Abdullah bin Umar reported,

When the Messenger of Allah ﷺ camped at al-Hijr during the expedition of Tabuk, he commanded the people not to drink from its well nor to draw water from it.They said, "We have already kneaded dough with it and drawn water from it."So he ordered them to throw away that dough and pour out that water.In another wording, the people stopped with the Messenger of Allah ﷺ at the land of Thamud, al-Hijr, and they drew water from its well and kneaded dough with it. The Messenger of Allah ﷺ commanded them to pour out what they had drawn from its well and to feed the dough to the camels, and he instructed them to draw water from the well which the she-camel used to frequent.

Azami 8364

Sahih

عن ابن عمر

أن رسول الله ﷺ لما نزل الحجر في غزوة تبوك أمرهم أن لا يشربوا من بئرها ولا يستقوا منها فقالوا: قد عجنا منها واستقينا فأمرهم أن يطرحوا ذلك العجين ويهريقوا ذلك الماء. وفي لفظ: أن الناس نزلوا مع رسول الله ﷺ أرض ثمود الحجر فاستقوا من بئرها واعتجنوا به فأمرهم رسول الله ﷺ أن يهريقوا ما استقوا من بئرها وأن يعلفوا الإبل العجين وأمرهم أن يستقوا من البئر التي كانت تردها الناقة.

الأعظمي 8364صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Stories of the prophets
Chapter
News of Adam عليه السلام
Section
Accounts of the Prophet of Allah Salih عليه السلام
Numbering
Jami al-Kamil 8364 (2nd edition)
Azami 8364