It is haraam to swear by anything other than Allaah, whether that be one’s father or leader, or on one’s honour or status, etc, because it is proven that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever swears an oath then let him swear by Allaah or else keep silent.” Agreed upon. And he said: “Whoever swears an oath, let him not swear by anything other than Allaah. Narrated by al-Nasaa’i. And he said: “Whoever swears an oath by anything other than Allaah has committed shirk.”
The Muslim should not regard anything as equal with Allaah, such as his homeland, the king or the leader, when pledging to work for them. Rather he should say: “I pledge to Allaah that I will do my best to do my duty to Allaah alone, then I will serve my country and help the Muslims, and I will follow the rules of the Scouts that do not go against the sharee’ah of Allaah.
A person’s actions should be in accordance with the laws of Allaah, and it is not permissible for him to promise that he will act according to the laws of a state or some other human group at all.
And Allaah is the Source of strength.