He was sitting with the Messenger of Allah ﷺ while a man was praying. Then the man supplicated, saying, "Allah, I ask You, for to You belongs all praise, there is no god but You, the Bestower, the Originator of the heavens and the earth, Possessor of majesty and honor, Ever-Living, Sustainer of all existence."The Prophet ﷺ said, "He has called upon Allah by His greatest name, the name by which when He is called He answers, and when He is asked He gives."
حدثنا عبد الرحمن بن عبيد الله الحلبي حدثنا خلف بن خليفة عن حفص يعني ابن أخي أنس
أنه كان مع رسول الله ﷺ جالسا ورجل يصلي ثم دعا اللهم إني أسألك بأن لك الحمد لا إله إلا أنت المنان بديع السموات والأرض يا ذا الجلال والإكرام يا حي يا قيوم فقال النبي ﷺ لقد دعا الله باسمه العظيم الذي إذا دعي به أجاب وإذا سئل به أعطى
Its isnad is sahih. Nasai narrated it in the chapter on Sahw, in the section on supplication after remembrance (dhikr), hadith no. 1301, from the hadith of Khalaf bin Khalifa, with this wording. Ibn Hibban graded it sahih, hadith no. 2382, as did Hakim, who said it meets the conditions of Muslim (1/503-504), and Dhahabi agreed with him.