Qutayla reported,

A woman from Juhaynah reported that a Jewish man came to the Prophet ﷺ and said, "You commit acts of associating partners with Allah and you ascribe equals to Him. You say, 'Whatever Allah wills and you will,' and you swear, 'By the Kaabah.'"So the Prophet ﷺ instructed them, when they wished to swear an oath, to say, "By the Lord of the Kaabah," and to say, "Whatever Allah wills, then whatever you will."

Nasai 3804

Sahih

أخبرنا يوسف بن عيسى قال حدثنا الفضل بن موسى قال حدثنا مسعر عن معبد بن خالد عن عبد الله بن يسار

عن قتيلة

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

النسائي 3804صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Oaths and vows
Chapter
Swearing by the Kaaba
Numbering
Darussalam 3804
Nasai 3804