**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.”**
[Sunan Al-Nisaa’ Hadith No. 3773]
Based on this and similar Hadith, the scholars have said that it is not permissible to swear by anyone other than Allah.
As for the oaths in the Qur’aan, the scholars have offered two explanations for them.
The first explanation is that there is an omission which is to be understood. So, when it is written in the Qur’aan “By the sun” it is understood as “By the Lord of the sun.”
The second explanation is that it is specific to Allah. Allah swears by means of His Creation when He intends to indicate their magnificence but no one other than Him has the right to do this.
As for the following Hadith in which the Messenger of Allah (Sallallaahu 'alayhi wa sallam) said " By his father, he shall succeed if he were true" then the scholars have provided three answers which are outlined below the following Hadith in which this occurs.
**Another hadith, the like of which has been narrated by Malik (b. Anas) (and mentioned above) is also reported by Talha b. 'Ubaidullah, with the only variation that the Prophet remarked:
By his father, he shall succeed if he were true (to what he professed), or: By his father, he would enter heaven if he were true (to what he professed).**
[Sahih Muslim Hadith No. 11]
The first explanation is that this oath was prior to it being forbidden to swear by anyone other than Allah
The second explanation is that this was not an oath but a phrase common on the tongues of the Arabs which would flow from the tongue when one spoke. An oath was not meant by it.
The third explanation is that the word “Lord” was hidden in the phrase so it actually means “By the Lord of his father, he shall succeed if he is truthful.”
Finally, based on this Hadith the majority of scholars have said that if one swears an oath by someone other than Allah, it does not come into being. Thus, one is not liable to pay any kaffaarah (expiation) of the oath.
Some from the Hanbali school of thought have said that if someone swears by our Prophet (sallallaahu 'alayhi wa sallam) then the oath does come into being and an expiation is necessary.
This Hadith also highlights that if one is to attach the Will of Allah and someone else to an affair he must not say If Allah Wills and If so and so wills. Rather, he should say If Allah Wills and then if so and so wills.
Source(s):