Ibn Abbas reported: A man came to the Prophet, peace and blessings be upon him, and he said, “What Allah wills and what you will.” The Prophet said, “Have you made me a partner with Allah? Rather, what Allah wills alone.”
Source: al-Adab al-Mufrad lil-Bukhārī 783
Grade: Sahih (authentic) according to Al-Albani
عَنِ ابْنِ عَبَّاس قَالَ رَجُلٌ لِلنَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ مَا شَاءَ اللَّهُ وَشِئْتَ قَالَ جَعَلْتَ لِلَّهِ نِدًّا مَا شَاءَ اللَّهُ وَحْدَهُ
783 الأدب المفرد للبخاري باب قول الرجل ما شاء الله وشئت
1/292 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الأدب المفرد