Concerning the saying of the slave-girl when
the Prophet asked her: "Where is Allah?" (ayn Allah)
And she said: "In the heaven" (fi al-sama'): She
belonged to a people who worshipped stones and denied the Maker.
When she confirmed the existence of Allah, she became thereby a
believer. If the Prophet had condemned her for this answer, it
would have been established that she was disbelieving in the
Maker. But he said of her: "She is a believer." He
understood from her gesture magnification of the Creator.

Nawawi said in his commentary on Muslim (Kitab
5 Bab 7 Hadith 33):

This is from among the ahadith that deal with
Allah's attributes and there are two schools of reading for it...
The first consists in believing in it without entering into its
meaning, while holding that there is nothing like unto Allah,
with His elevation above the characteristics of things created.
The second consists in interpreting it with what befits Him.

Whoever holds the latter position says that the
meaning of the tradition is that the Prophet intended to test
her: was she a believer in oneness (muwahhida) who
confirms that the Creator, Disposer, and Doer is Allah alone?
that He it is Who, when the petitioner invokes Him, he turns
towards the heaven, and when the worshipper prays, he turns
towards the Ka`ba? -- and this is not because He is circumscribed
in the heaven, just as this is not because He is circumscribed in
the direction of the Ka`ba; rather this is because the heaven is
the orientation of those who invoke, just as the Ka`ba is the
orientation of those who pray -- or, on the other hand, was she
of the idol-worshippers who worship the idols that are in front
of them? When she replied: "In heaven," it was
understood that she was a believer in oneness and not an
idol-worshipper.

Qadi `Iyad said:

"There is no disagreement among the
Muslims, all without exception: their jurists, scholars of
hadith, theologians, keen-sighted ones, and imitators, that the
external meanings cited pertaining to Allah being "in the
heaven" -- as in His saying: "Have you taken security
from Him Who is in the Heaven that He will not cause the earth to
swallow you?" (67:16) and the like -- are not as they appear
(laysat `ala zahiriha) but rather are interpreted by all
of the scholars (muta'awwila `inda jami`ihim). He among
the muhaddithin, fuqaha' and mutakallimin who spoke to establish
that there is aboveness in direction without specifying dimension
or modality : he did so only by interpreting "in the
heaven" (fi al-sama') to mean "above the
heaven" (`ala al-sama'). And of the great multitude
of the keen-sighted ones and theologians and those who establish
Allah's freedom from any likeness to creation who spoke to negate
the concept of limit and the inconceivability of direction with
relation to Allah: they did so only by interpreting with various
figurative interpretations, according to the necessity of each
case.

Qadi `Iyad continues, "Some of them
practiced mutual tolerance in the matter of establishing a
direction for Allah (i.e. they did the latter to some extent),
but only with apprehension at such tolerance: for is there any
difference between asking "how" and establishing
directions for Allah? However, whatever generalization the Law
has made such as about Allah being the Omnipotent over (fawqa)
His slaves and His establishing Himself over (`ala) the
Throne, it is always with strong adherence (tamassuk) to
the verse which sums up the total transcendence (al-tanzih
al-kulli) of Allah above creation, "There is nothing
like unto Him," without which nothing of what is conceived
in the mind is sound. Such adherence is perfect protection for
him to whom Allah the Exalted grants success." And this,
says Nawawi, is the end of Qadi `Iyad's discourse."

`Ali al-Qari said in his commentary on Mishkat
al-masabih in relation to the hadith "Where is
Allah?":

Al-Qadi `Iyad said: "By asking this, the
Prophet's intent was not to ask about Allah's place (makan), for
verily He is above and beyond space, as He is above and beyond
time. Rather the intent of his question to her was to find out
whether she was a believer in oneness (muwahhida) or someone who
associated partners to Allah (mushrika), because the unbelievers
(kuffar) of the Arabs used to worship idols, and each tribe used
to have a specific idol in its midst which it worshipped and
aggrandized, and it may be that the simple-minded and ignorant
ones among them did not know any other object of worship than
that idol. The Prophet therefore meant to determine what she
worshipped. When she said: "in the heaven," -- and
another narration says that she made a sign towards the heaven --
it was understood that she was a believer in oneness. He meant by
this line of questioning the disavowal of the gods of the earth
(nafi al-aliha al-ardiyya) which are the idols, not the
establishment of the heaven as a location for Allah, and Allah is
greatly exalted from the sayings of the wrong-doers!"