Musnad Ahmad 598
حَدَّثَنَا عَبْد اللَّهِ، حَدَّثَنِي أَبُو كُرَيْبٍ مُحَمَّدُ بْنُ الْعَلَاءِ ، حَدَّثَنَا ابْنُ الْمُبَارَكِ ، عَنْ يَحْيَى بْنِ أَيُّوبَ ، عَنْ عُبَيْدِ اللَّهِ بْنِ زَحْرٍ ، عَنْ عَلِيِّ بْنِ يَزِيدَ ، عَنِ الْقَاسِمِ ، عَنْ أَبِي أُمَامَةَ ، قَالَ: قَالَ عَلِيٌّ رَضِيَ اللَّهُ عَنْهُ: كُنْتُ آتِي النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ، فَأَسْتَأْذِنُ،" فَإِنْ كَانَ فِي صَلَاةٍ سَبَّحَ، وَإِنْ كَانَ فِي غَيْرِ صَلَاةٍ أَذِنَ لِي".
ʿAbdullah narrated to us; he said: Abu Kurayb Muhammad ibn al-ʿAlaʾ narrated to me; he said: Ibn al-Mubarak narrated to us, from Yahya ibn Ayyub, from ʿUbaydullah ibn Zahr, from ʿAli ibn Yazid, from al-Qasim, from Abu Umamah, who said: ʿAli, may Allah be pleased with him, said: I used to come to the Prophet ﷺ and ask permission [to enter], "and if he was in prayer, he would say 'Subhan Allah', and if he was not in prayer, he would give me permission."