Anas ibn Malik reported: If a drought became threatening, Umar ibn al-Khattab, may Allah be pleased with him, would ask Al-‘Abbas ibn Abdul Muttalib to supplicate for Allah to send rain. Umar would say, “O Allah, we used to ask our Prophet, peace and blessings be upon him, to supplicate for rain and You would bless us with rain. Now we ask the uncle of our Prophet to supplicate for rain, so bless us with rain.” And so it would rain.
Source: Ṣaḥīḥ al-Bukhārī 1010
Grade: Sahih (authentic) according to Al-Bukhari
Ibn Taymiyyah said, “When they replaced using the Prophet as a means for using Al-Abbas instead, it was understood that what they did in his life became impossible after his death, unlike using him as a means by having faith in him and obeying him, which are legislated for all times.”
Source: Majmū’ al-Fatāwá 1/201
عَنْ أَنَسِ بْنِ مَالِكٍ أَنَّ عُمَرَ بْنَ الْخَطَّابِ رَضِيَ اللَّهُ عَنْهُ كَانَ إِذَا قَحَطُوا اسْتَسْقَى بِالْعَبَّاسِ بْنِ عَبْدِ الْمُطَّلِبِ فَقَالَ اللَّهُمَّ إِنَّا كُنَّا نَتَوَسَّلُ إِلَيْكَ بِنَبِيِّنَا صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَتَسْقِينَا وَإِنَّا نَتَوَسَّلُ إِلَيْكَ بِعَمِّ نَبِيِّنَا فَاسْقِنَا قَالَ فَيُسْقَوْنَ
1010 صحيح البخاري كتاب الاستسقاء باب سؤال الناس الإمام الاستسقاء إذا قحطوا
قال ابن تيمية فَلَمَّا عَدَلُوا عَنْ التَّوَسُّلِ بِهِ إلَى التَّوَسُّلِ بِالْعَبَّاسِ عُلِمَ أَنَّ مَا يُفْعَلُ فِي حَيَاتِهِ قَدْ تَعَذَّرَ بِمَوْتِهِ بِخِلَافِ التَّوَسُّلِ الَّذِي هُوَ الْإِيمَانُ بِهِ وَالطَّاعَةُ لَهُ فَإِنَّهُ مَشْرُوعٌ دَائِمًا
1/201 مجموع الفتاوى