From Sahih Muslim (Hadith 621):
Anas b. Malik reported:The Messenger of Allah (ﷺ) went to a far-off place in the desert (hidden from the sight of human beings) for relieving himself. Then I brought water for him and he cleansed himself
Reference: Muslim 621