Sunan Abi Dawud, Hadith 1538

Jabir b. 'Abd Allah said: The Messenger of Allah used to teach us the supplication for isthikharah (seeking what us beneficial from Allah) as he would teach us a surah (chapter) from the Qur'an. He would tell us: When one of you intends to do a work, he should offer two supererogatory rak'ahs of prayer, and then say (at the end of the prayer): "O Allah, I seek Your choice on the better (of the two matters) based upon Your knowledge, and I seek Your decree based upon Your power, and I ask You for Your great bounties. For Indeed, You are the One Who Decrees, and I do not decree, and You know, and I do not know, and You are the Knower of the Unseen. O Allah, if you know this, and You are the Knower of the Unseen. O Allah, if you know this - here he should name exactly what he wishes - is better for me with regard to my religion, and my life, and my afterlife, and the end result of my affairs, then decree it to me, and make it easy for me, and bless me on it. O Allah, and if You know this to be evil for me - and he says just as he said the first time - then avert it for me, and avert me from it. And decree for me good wherever it might be, the make me content with it." A version goes: "If the work is good immediately or subsequently." Ibn Maslamah and Ibn 'Isa reported from Muhammad b. al-Munkadir on the authority of Jabir.

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ الْقَعْنَبِيُّ، وَعَبْدُ الرَّحْمَنِ بْنُ مُقَاتِلٍ، خَالُ الْقَعْنَبِيِّ وَمُحَمَّدُ بْنُ عِيسَى - الْمَعْنَى وَاحِدٌ - قَالُوا حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ أَبِي الْمَوَالِ، حَدَّثَنِي مُحَمَّدُ بْنُ الْمُنْكَدِرِ، أَنَّهُ سَمِعَ جَابِرَ بْنَ عَبْدِ اللَّهِ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُعَلِّمُنَا الاِسْتِخَارَةَ كَمَا يُعَلِّمُنَا السُّورَةَ مِنَ الْقُرْآنِ يَقُولُ لَنَا ‏"‏ إِذَا هَمَّ أَحَدُكُمْ بِالأَمْرِ فَلْيَرْكَعْ رَكْعَتَيْنِ مِنْ غَيْرِ الْفَرِيضَةِ وَلْيَقُلِ اللَّهُمَّ إِنِّي أَسْتَخِيرُكَ بِعِلْمِكَ وَأَسْتَقْدِرُكَ بِقُدْرَتِكَ وَأَسْأَلُكَ مِنْ فَضْلِكَ الْعَظِيمِ فَإِنَّكَ تَقْدِرُ وَلاَ أَقْدِرُ وَتَعْلَمُ وَلاَ أَعْلَمُ وَأَنْتَ عَلاَّمُ الْغُيُوبِ اللَّهُمَّ إِنْ كُنْتَ تَعْلَمُ أَنَّ هَذَا الأَمْرَ - يُسَمِّيهِ بِعَيْنِهِ الَّذِي يُرِيدُ - خَيْرٌ لِي فِي دِينِي وَمَعَاشِي وَمَعَادِي وَعَاقِبَةِ أَمْرِي فَاقْدُرْهُ لِي وَيَسِّرْهُ لِي وَبَارِكْ لِي فِيهِ اللَّهُمَّ وَإِنْ كُنْتَ تَعْلَمُهُ شَرًّا لِي مِثْلَ الأَوَّلِ فَاصْرِفْنِي عَنْهُ وَاصْرِفْهُ عَنِّي وَاقْدُرْ لِيَ الْخَيْرَ حَيْثُ كَانَ ثُمَّ رَضِّنِي بِهِ ‏"‏ ‏.‏ أَوْ قَالَ ‏"‏ فِي عَاجِلِ أَمْرِي وَآجِلِهِ ‏"‏ ‏.‏ قَالَ ابْنُ مَسْلَمَةَ وَابْنُ عِيسَى عَنْ مُحَمَّدِ بْنِ الْمُنْكَدِرِ عَنْ جَابِرٍ ‏.‏

sunnah.com