Presented below is the famous hadith of the slave girl:
Mu’awiya b. al−Hakam said:
I had a maid−servant who tended goats by the side of Uhud and Jawwaniya. One day I happened to pass that way and found that a wolf had carried a goat from her flock. I am after all a man from the posterity of Adam. I felt sorry as they (human beings) feel sorry. So I slapped her. I came to the Messenger of Allah (may peace be upon him) and felt (this act of mine) as something grievous I said: Messenger of Allah, should I not grant her freedom? He (the Holy Prophet) said: Bring her to me. So I brought her to him.
He said to her: Where is Allah? She said: He is in the heaven.
He said: Who am I? She said: You are the Messenger of Allah.
He said: Grant her freedom, she is a believing woman.
Sahih Muslim, The Book of Prayer (Book 4), Chapter 52: FORBIDDANCE OF TALKING IN PRAYER AND ABROGATION OF WHAT WAS PERMISSIBLE, Hadith No. 1094
It has also been narrated by Yahya b. Abu Kathir with the same chain of transmitters (Hadith No. 1095 in Sahih Muslim). This hadith is Mutawaatir (reported by a large number of narrators at every stage of its transmission, so that it is impossible for it to have been invented) and there is no doubt about its authenticity.
You might unfortunately find this hadith translated with the wording “He is in the heaven”. This is not the correct and intended meaning. The following screenshot which was taken from the book, Shaykh ‘Uthaymeen’s notes on ‘Aqeedatul-Wasitiyyah should hopefully clarify matters:
Also, concerning the words “Fi ‘al-sama’ (In the heaven)”, Imam Al-Baihaqi said the following words:
“Abu Abdullah Al-Haafidh said that Shaykh Abu Bakr Ahmad bin Ishaaq Bin Ayoub Al-Faqih said:
‘Sometimes the Arabs replace ‘Ala (above) with fi (in). (For example) Allah said ‘So travel freely in (fi) the land’ (9:2)…meaning ‘on (‘ala) the earth’ and similarly ‘I will surely crucify you in (fi) the trunks of date-palms’ (20:71) [meaning ‘on (‘ala) the trunks’]. Similar is the saying of Allah ‘Fi al-sama’ which means ‘on the throne, above (fauq) the sky’, as is is proven in authentic narration.'”
Al-Asmaa Wa Al-Sifaat by Al-Baihaqi vol 2, p 425