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:570Abū Saʿīd

ʿAli said: There was a time before dawn when I would ask to enter upon the Messenger of Allah ﷺ. If he was praying, he would say Subhan Allah to me, and that was my permission to enter; if he was not praying, he would give me permission to enter.  

أحمد:٥٧٠حَدَّثَنَا أَبُو سَعِيدٍ حَدَّثَنَا عَبْدُ الْوَاحِدِ بْنُ زِيَادٍ الثَّقَفِيُّ حَدَّثَنَا عُمَارَةُ بْنُ الْقَعْقَاعِ عَنِ الْحَارِثِ بْنِ يَزِيدَ الْعُكْلِيِّ عَنْ أَبِي زُرْعَةَ عَنْ عَبْدِ اللهِ بْنِ نُجَيٍّ قَالَ قَالَ

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


See similar narrations below:

Collected by Nasāʾī's Kubrá
nasai-kubra:8446Zakariyyā b. Yaḥyá > Muḥammad b. ʿUbayd And ʾAbū Kāmil > ʿAbd al-Wāḥid b. Ziyād > ʿUmārah b. al-Qaʿqāʿ > al-Ḥārith al-ʿUklī > Abū Zurʿah b. ʿAmr b. Jarīr > ʿAbdullāh b. Najī

ʿAli said: There was a time before dawn when I would ask to enter upon the Messenger of Allah ﷺ. If he was praying, he would say Subhan Allah to me, and that was my permission to enter; if he was not praying, he would give me permission to enter. (Using translation from Aḥmad 570)   

الكبرى للنسائي:٨٤٤٦أَخْبَرَنِي زَكَرِيَّا بْنُ يَحْيَى قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدٍ وَأَبُو كَامِلٍ قَالَا حَدَّثَنَا عَبْدُ الْوَاحِدِ بْنُ زِيَادٍ قَالَ حَدَّثَنَا عُمَارَةُ بْنُ الْقَعْقَاعِ عَنِ الْحَارِثِ الْعُكْلِيِّ عَنْ أَبِي زُرْعَةَ بْنِ عَمْرِو بْنِ جَرِيرٍ عَنْ عَبْدِ اللهِ بْنِ نَجِيٍّ قَالَ

قَالَ عَلِيٌّ «كَانَتْ لِي سَاعَةٌ مِنَ السَّحَرِ أَدْخُلُ فِيهَا عَلَى رَسُولِ اللهِ ﷺ فَإنْ كَانَ فِي صَلَاتِهِ سَبَّحَ فَكَانَ ذَلِكَ إِذْنُهُ لِي وَإِنْ لَمْ يَكُنْ فِي صَلَاتِهِ أَذِنَ لِي»