Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:23355ʿAffān > Hammām > al-Ḥajjāj b. Farāfiṣah > a man

[Machine] Huzaifa bin Al-Yaman came to the Prophet ﷺ and said, "While I was praying, I heard someone say, 'O Allah, all praise is due to You, all kingdom belongs to You, all goodness is in Your hands, and all matters return to You, both visible and hidden. It is worthy for praise that You are capable of everything. O Allah, forgive all my past sins, protect me for the remainder of my life, and grant me pure deeds that You are pleased with.' The Prophet ﷺ said, 'That was an angel who came to teach you how to praise your Lord.'"  

أحمد:٢٣٣٥٥حَدَّثَنَا عَفَّانُ حَدَّثَنَا هَمَّامٌ حَدَّثَنَا الْحَجَّاجُ بْنُ فَرَافِصَةَ حَدَّثَنِي رَجُلٌ

عَنْ حُذَيْفَةَ بْنِ الْيَمَانِ أَتَى النَّبِيَّ ﷺ فَقَالَ بَيْنَمَا أَنَا أُصَلِّي إِذْ سَمِعْتُ مُتَكَلِّمًا يَقُولُ اللهُمَّ لَكَ الْحَمْدُ كُلُّهُ وَلَكَ الْمُلْكُ كُلُّهُ بِيَدِكَ الْخَيْرُ كُلُّهُ إِلَيْكَ يُرْجَعُ الْأَمْرُ كُلُّهُ عَلَانِيَتُهُ وَسِرُّهُفَأَهْلٌ أَنْ تُحْمَدَ إِنَّكَ عَلَى كُلِّ شَيْءٍ قَدِيرٌ اللهُمَّ اغْفِرْ لِي جَمِيعَ مَا مَضَى مِنْ ذُنُوبِي وَاعْصِمْنِي فِيمَا بَقِيَ مِنْ عُمْرِي وَارْزُقْنِي عَمَلًا زَاكِيًا تَرْضَى بِهِ عَنِّي فَقَالَ النَّبِيُّ ﷺ ذَاكَ مَلَكٌ أَتَاكَ يُعَلِّمُكَ تَحْمِيدَ رَبِّكَ