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.
suyuti:15471a
Request/Fix translation

  

السيوطي:١٥٤٧١a

"عَجِيتُ لِصَبْرِ أخِي يُوسفَ وكَرَمِهِ - واللهُ يَغْفِرُ له - حيثُ أُرْسِلَ إِليه ليُسْتَفْتَى في الرُّؤْيَا، ولو كُنْت أنا لَمْ أَفعَلْ حَتَّى أَحْرُجَ، وعجبتُ لصبْره وكَرَمِه والله يغفرُ له، أُتى ليَخْرجُ فلم يخرِج حَتَّى أخْبَرَهَم بِعُذْرِهِ، ولو كنتُ أنا لَبَادرَتُ البابَ، ولَوَلا الْكلِمُةَ، لما لَبِثَ في السجنِ حَتَّى يبتغِى الفرج من عِنِدِ غير الله ﷻ, قوله: "اذكرنى عند ربك".  

[طب] الطبرانى في الكبير وابن مردويه, وابن النجار عن ابن عباس

See similar narrations below:

Collected by Ṭabarānī
tabarani:11640Aḥmad b. ʿAbd al-Raḥman b. Bashhār al-Nasāʾī > Isḥāq b. Rāhawayh > ʿAmr b. Muḥammad al-ʿAnqazī > Ibrāhīm b. Yazīd > ʿAmr b. Dīnār > ʿIkrimah > Ibn ʿAbbās

[Machine] "Narrated by the Messenger of Allah, ﷺ , he said: 'I am amazed at the patience and honor of my brother Yusuf. By Allah, He forgives him wherever he is sent to be consulted about a dream. If it were me, I would not have done so until I left. I am amazed at his patience and honor. By Allah, he was called to leave, but he did not leave until he informed them of his excuse. If it were me, I would have rushed to the door. If it were not for the word (mention) there, he would not have stayed in prison, seeking relief from other than Allah.' His saying is: 'Remember Me with your Lord.'"  

الطبراني:١١٦٤٠حَدَّثَنَا أَحْمَدُ بْنُ عَبْدِ الرَّحْمَنِ بْنِ بَشَّارٍ النَّسَائِيُّ ثنا إِسْحَاقُ بْنُ رَاهَوَيْهِ أَنَا عَمْرُو بْنُ مُحَمَّدٍ الْعَنْقَزِيُّ ثنا إِبْرَاهِيمُ بْنُ يَزِيدَ عَنْ عَمْرِو بْنِ دِينَارٍ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ

عَنْ رَسُولِ اللهِ ﷺ قَالَ عَجِبْتُ لصبرِ أَخِي يُوسُفَ وكَرَمِهِ وَاللهُ يَغْفِرُ لَهُ حَيْثُ أُرْسِلَ إِلَيْهِ ليُسْتَفْتَى فِي الرُّؤْيَا وَلَوْ كُنْتُ أَنَا لَمْ أَفْعَلْ حَتَّى أَخْرُجَ وعَجِبْتُ لصَبْرِهِ وكَرَمِهِ وَاللهُ يَغْفِرُ لَهُ أُتِي لِيَخْرُجَ فَلَمْ يَخْرُجْ حَتَّى أَخْبَرَهُمْ بِعُذْرِهِ وَلَوْ كُنْتُ أَنَا لبادرتُ الْبَابَ وَلَوْلَا الْكَلِمَةُ لَمَا لَبِثَ فِي السِّجْنِ حَيْثُ يَبْتَغِي الْفَرَجَ مِنْ عِنْدِ غَيْرِ اللهِ قَوْلُهُ {اذْكُرْنِي عِنْدَ رَبِّكَ}