Sunan an-Nasa'i, Book 35, Hadith 13 (In-Book) ⓘ
It was narrated from 'Abdullah bin Yasar, from Qutailah, a woman from Juhainah, that a Jew came to the Prophet and said: "You are setting up rivals (to Allah) and associating others (with Him). You say: 'Whatever Allah wills and you will,' and you say: 'By the Ka'bah.'" So the Prophet commanded them, if they wanted to swear an oath, to say: "By the Lord of the Ka'bah;" and to say: "Whatever Allah wills, then what you will."
أَخْبَرَنَا يُوسُفُ بْنُ عِيسَى، قَالَ حَدَّثَنَا الْفَضْلُ بْنُ مُوسَى، قَالَ حَدَّثَنَا مِسْعَرٌ، عَنْ مَعْبَدِ بْنِ خَالِدٍ، عَنْ عَبْدِ اللَّهِ بْنِ يَسَارٍ، عَنْ قُتَيْلَةَ، - امْرَأَةٌ مِنْ جُهَيْنَةَ - أَنَّ يَهُودِيًّا، أَتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ إِنَّكُمْ تُنَدِّدُونَ وَإِنَّكُمْ تُشْرِكُونَ تَقُولُونَ مَا شَاءَ اللَّهُ وَشِئْتَ وَتَقُولُونَ وَالْكَعْبَةِ . فَأَمَرَهُمُ النَّبِيُّ صلى الله عليه وسلم إِذَا أَرَادُوا أَنْ يَحْلِفُوا أَنْ يَقُولُوا " وَرَبِّ الْكَعْبَةِ " . وَيَقُولُونَ " مَا شَاءَ اللَّهُ ثُمَّ شِئْتَ " .
also referenced under: Hadith 3773 (Reference) & Volume 4, Book 35, Hadith 3804 (DarusSalam)