It is narrated from Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) that he said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "When one of you intends to do something, let him supplicate thus: 'Allahumma inni astakhiruka bi-'ilmika wa astaqdiruka bi-qudratika, wa as'aluka min fadlika, fa-innaka taqdiru wa la aqdiru, wa ta'lamu wa la a'lamu, wa anta 'allamu al-ghuyub; Allahumma in kana kadha wa kadha khayran li fi dini wa ma'ishati wa 'aqibati amri, wa illa fasrifhu 'anni wasrifni 'anhu, thumma uqdur liya al-khayra aynama kana, la hawla wa la quwwata illa billah' (O Allah, I seek the good from You by Your knowledge, and I seek strength from You by Your power, and I ask You of Your bounty, for You have power and I have no power, You know and I do not know, and You are the Knower of all the unseen; O Allah, if this matter (which I intend) is good for me in my religion, my livelihood and the outcome of my affairs, (then decree it for me), otherwise turn it away from me and turn me away from it, then decree good for me wherever it may be; there is no power to avoid sin and no strength to do good except through Allah)." Imam Ahmad bin Hanbal and Imam al-Tabarani, in his work 'Kitab al-Du'a', recorded this hadith, and it has already been mentioned in detail in the chapter on the 'Istikharah prayer'. This hadith has a supporting report (shahid) from the narration of Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) in Sahih al-Bukhari and elsewhere; also, Imam al-Bazzar recorded it in his Musnad from Sayyiduna Ibn Mas'ud (may Allah be pleased with him), and Imam al-Tabarani recorded it in 'Kitab al-Du'a' from the narrations of Sayyiduna Abdullah bin Mas'ud, Sayyiduna Jabir bin Abdullah, Sayyiduna Abu Sa'id al-Khudri, Sayyiduna Ibn Umar, Sayyiduna Ibn Abbas, Sayyiduna Abu Hurayrah and Sayyiduna Abu Ayyub al-Ansari (may Allah be pleased with them).
Hadith Gradingمحدثین:سكت عنه البوصيري، إسناده ضعيف؛ عيسى بن عبد الله بن مالك مقبول ولم يتابع، وأصل الاستخارة في صحيح البخاري من حديث جابر
Hadith Takhrij«عيسى بن عبد الله بن مالك الدار: مقبول (التقريب ص439)؛ ابن إسحاق صرح بالتحديث؛ محمد بن عمرو بن عطاء وعطاء بن يسار ثقتان (من الحفظ)» «أخرجه صحيح البخاري برقم: 6019، وأخرجه سنن الترمذي برقم: 480، وأخرجه سنن النسائي برقم: 3253، وأخرجه سنن أبي داود برقم: 1538، وأخرجه سنن ابن ماجه برقم: 1383، وأخرجه مسند أحمد برقم: 14297، وأخرجه فتح الباري برقم: 6019، وأخرجه رياض الصالحين برقم: 755، وأخرجه شرح السنة برقم: 1016»