Qutayla reported,

A Jewish man came to the Prophet ﷺ and said, "You commit shirk by setting up rivals to Allah. You say, 'Whatever Allah wills and you will,' and you swear, 'By the Kaabah.'"So the Prophet ﷺ instructed them, when they wished to take an oath, to say, "By the Lord of the Kaabah," and to say, "Whatever Allah wills, then you will."

Azami 11893

Sahih

عن قتيلة امرأة من جهينة

أن يهوديا أتى النبي ﷺ فقال: إنكم تنددون، وإنكم تشركون تقولون: ما شاء الله وشئت، وتقولون: والكعبة، فأمرهم النبي ﷺ الله إذا أرادوا أن يحلفوا أن يقولوا: ورب الكعبة و يقولوا: ما شاء الله ثم شئت.

الأعظمي 11893صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "O people, worship your Lord who created you and those before you, that you may become righteous. He who made for you the earth a bed and the sky a ceiling, and sent down from the sky rain, and brought forth thereby fruits as provision for you. So do not attribute to Allah equals while you know."
Numbering
Jami al-Kamil 11893 (2nd edition)
Azami 11893