A man came to the Prophet ﷺ with a black slave girl and said, "Messenger of Allah, I am obligated to free a believing slave."The Prophet ﷺ asked her, "Where is Allah?"She pointed with her finger to the sky.He then asked her, "Who am I?"She pointed to the Prophet ﷺ and then to the sky, meaning, "You are the Messenger of Allah."He said, "Free her, for she is a believer."
حدثنا إبراهيم بن يعقوب الجوزجاني حدثنا يزيد بن هارون قال أخبرني المسعودي عن عون بن عبد الله عن عبد الله بن عتبة
أن رجلا أتى النبي ﷺ بجارية سوداء فقال يا رسول الله إن علي رقبة مؤمنة فقال لها أين الله فأشارت إلى السماء بأصبعها فقال لها فمن أنا فأشارت إلى النبي ﷺ وإلى السماء يعني أنت رسول الله فقال أعتقها فإنها مؤمنة
[Its chain of transmission is daif] Bayhaqi (7/388) narrated it from the hadith of Abu Dawud through the same route. Masudi's memory became confused, and Yazid bin Harun's hearing from him was after his confusion set in.