Yoosuf, 'alayhis-salaam, saw the corrupt outlook of the Pharaohs in Egypt and their oppression, and he knew the beliefs of the nation amongst whom he lived. He knew the corruption of their beliefs and their idolatry, which led them to take idols and cattle as gods to worship besides Allaah. The stroy of this noble Prophet, 'alayhis-salaam, is long, and from it, we will examine the story of his imprisonment and his da'wah at that time. Allaah, the Most High, says,
"And two young men entered the prison along with him. One of them said, 'I saw in a dream that I was pressing grapes,' and the other one said, 'I saw in a dream that I was carrying bread upon my head and birds were eating from it.' 'Inform us of the interpretation of this for indeed we see that you are one of the doers of good.' He said, 'No food will come to you to eat except that I will inform you about it fully before it comes to you. This is from the knowledge which my Lord has taught me as I have remained free of the religion of a people who do not believe in the oneness of Allaah and who are disbelievers in the Hereafter. Rather I follow the religion of my fathers, Ibraaheem, Ishaaq and Ya'qoob. It is not fitting that we should worship anything else along with Allaah. This is from Allaah's favour upon us and upon the people, yet most of the people do not give thanks for Allaah's favours. O my two companions in the prison, is it better that you worship many different lords, or that you worship only Allaah, the One, Who subdues and has full power over everything? You do not worship besides Allaah except idols which you call gods, which you and your forefathers give names to, for which Allaah has sent down no authority. Authority is for Allaah alone. He ordered that you worship none but Him, that is the Straight and true religion, yet most of the people do not know (and are people of shirk).'" [Soorah Yoosuf (12):36-40]
This noble Prophet, 'alayhis-salaam, lived in their palaces and was therefore well aware of the corruption of their administration and their rulers. He experienced at first hand their plots, their oppression, their unjust persecution and imprisonment by them. Furthermore he lived amongst an idolatrous nation who worshipped idols, cattle and stars. So where was correction to begin? What was the starting point?
Did he begin calling to Allaah, whilst he was wrongfully imprisoned along with others who were oppressed like him, by inciting them and rousing them against the despotic and tyrant rulers? This would be without a doubt a political response, and was an opportunity open to him. Or did he begin his call from the starting point adopted by his noble forefathers, and at the head of them Ibraaheem, the chosen and beloved Friend of Allaah and the Imaam of the call to tawheed; which was the starting point for all the Messengers of Allaah? There is no doubt that the single way of correction and rectification in every time and place is the way of calling to correct 'aqeedah and tawheed and that all worship should be made purely and sincerely for Allaah alone.
Therefore Yoosuf began from this starting point, following his noble fathers, proud of their 'aqeedah, and deriding and exposing the foolishness of the idolaters and their practice of taking idols, cattle and stars as lords to be worshipped besides Allaah.
So after clearly explaining this, and openly calling to tawheed and to rejection of shirk, he emphasised his call and his argument by his saying,
"Authority and command is for Allaah alone." [Soorah Yoosuf (12):40] 
Then he explained this authority and command to mean the tawheed of Allaah, and that He alone is to be worshipped:
"...That is the Straight and true reigion, yet most of the people do not know (and are people of shirk)." [Soorah Yoosuf (12):40]
Also Yoosuf, 'alayhis-salaam, attained the highest position in this state  whilst calling to the tawheed of Allaah and establishing the clear proofs for his call and his Prophethood. Allaah, the Most High, says, in explanation of this,
"The king of Egypt said, 'Bring him to me, I will make him my personal servant.' So when he spoke to Yoosuf, he said, 'Verily, this day you have with us a position of rank and full trust.' He said, 'Place me in charge of the storehouses and wealth of the land, indeed I will guard them faithfully and with full knowledge.'" [Soorah Yoosuf (12):54-55]
And he said, giving thanks to his Lord and Protector,
"O my Lord, You have bestowed upon me something of dominion and have taught me the interpretation of dreams. O Originator and Creator of the heavens and the earth, You are my Lord and Protector in this world and the Hereafter. Cause me to die as a Muslim and join me with the righteous."[/b] [Soorah Yoosuf (12):101]
Furthermore Allaah says in explanation of his da'wah, upon the tongue of the Believer from the family of the Pharaoh:
"And Yoosuf came to you previously (before Moosaa) with clear signs yet you have not ceased doubting about what he came to you with. Until when he died you said, 'Allaah will not send any Messenger after him.' This is the state of those whom Allaah leads astray, those who are disbelievers in Him and doubt the truthfulness of the Messengers." [Soorah Ghaafir (40):34]
So from the knowledge to be learned from the life-story of Yoosuf, 'alayhis-salaam, which is presented to us in those noble Aayaat is that the call to tawheed is something very essential. Furthermore there is to be no leniency or relaxation in fighting against shirk, it is not permissible to keep silent about it, whatever the circumstances of the caller to Allaah; rather it is not permissible for any Muslim to ever accept it or be relaxed about it. So this shows the high station of 'aqeedah, and its importance with Allaah, and with His Prophets and His Messenger. It also shows the very great difference and the distance between it and the details of Islaam.
It is not permissible for the Muslim, particularly the caller, to take up any position which violates his 'aqeedah or is contrary to it, or that he is a fortune-teller, those who are Mushriks, or that he is a custodian of their idols. If he does any of this then he is one of the misguided Mushriks. With regard to the legislative aspect, if the Islaamic state is established, it must apply the Sharee'ah of Allaah, otherwise:
"And whoever does not judge by what Allaah has revealed then they are the ones guilty of infidelity (Kufr)." [Soorah al-Maa'idah (5):44]
The unbelief (kufr) here is explained in detail by the scholars of Islaam, from the Companions and others, that it may be major Kufr, when the person disdains the Sharee'ah of Allaah and declares it lawful to judge by something else, and it may be lesser Kufr (i.e., that which does not take a person out of Islaam) when he does not declare it lawful to judge by other than it, but gives in to his desires and because of that judges by other than what Allaah sent down.
However when the Islaamic state has not been established, then Allaah does not a burden a soul with more than it is capable of. So the Muslim may take up a position in a non-Muslim state with the condition that he establishes justice, and that he does not obey them ina matter which involves disobedience to Allaah, and does not judge by other than what Allaah sent down. This was what the Prophet of Allaah, Yoosuf, did. He took up a position as a deputy for a unbelieving king, and he did not judge according to his laws:
"He could not have taken and kept his brother according to the king's law." [Soorah Yoosuf (12):76]
Furthermore, he established justice between the subjects and called them to the tawheed of Allaah. So this contains a decisive reply to those who give little importance to the 'aqeedah of Tahweed. Those who gloss over and accomodate when it comes to the shirk which has filled the world, and they regard the callers to tawheed and the enemies of shirk with contempt and scorn. They turn up their noses and are too proud to 'lower' themselves to the level of the callers to tawheed, and they are very wily and astute concerning political affairs, but nothing is more burdensome and disagreeable to their hearing and their hearts than listening to or saying a word regarding tawheed or shirk. These types of callers have caused themselves to fall into a deep abyss, whilst they think that they have reached the highest peaks. Can a people ever prosper whose stance with regard to the call of the Prophets is like this, unless they sincerely repent to Allaah from what they are upon?
 As indicated in the hadeeth of Ibn 'Umar, radiyallaahu 'anhumaa, from the Prophet (sal-Allaahu 'alayhe wa sallam) that he said,
"The noble one, son of the noble one, son of the noble one: Yoosuf the son of Ya'qoob, the son of Ishaaq, the son of Ibraaheem, 'alayhis-salaam." [Reported by al-Bukhaaree (Eng. trans. 4/390/596), and Ahmad in al-Musnad (2/96)]
And also the hadeeth of Aboo Hurayrah, radiyallaahu 'anhu, that Allaah's Messenger (sal-Allaahu 'alayhe wa sallam) was asked about the noblest of the people, so he said,
"Those most pious and obedient to Allaah." They said, "It is not this that we are asking about." He said, "Then the noblest of the people is Yoosuf, the Prophet of Allaah, son of the Prophet of Allaah, son of the Prophet of Allaah, son of the chosen and beloved Friend of Allaah." They said, "It is not this that we are asking about." He said, "Then is it about the origins of the Arabs that you ask? Then the people are of various origins. The best of them in the times of ignorance are the best of them in Islaam when they attain knowledge and understanding in the religion." [Reported by al-Bukhaaree (Eng. trans. 4/390/597)]
 This Aayah is one of the basic principles from the principles of tawheed, as Allaah has explained upon the tongue of Yoosuf, 'alayhis-salaam. What is most unfortunate is that you see that many of the political reformers have explained it in a way that is far removed from its primary meaning, that all worship is to be made purely and sincerely for Allaah alone, and have instead explained it to have a political meaning, which is establishment of the state which they claim will establish Allaah's Sharee'ah upon the earth as His deputies/vicegerents. Then they go beyond bounds in this direction till they cause the people to forget the principal meaning of the Aayah, and they understand nothing from it except this new meaning, and there is no action and no ability except by the will of Allaah. They do the same with all or most of the Aayaat of tawheed.
 Shaykhul-Islaam Ibn Taymiyyah, rahimahullaah, said in al-Hisbah (p.7),
"Likewise Yoosuf the truthful and honest, was a minister for the Pharaoh of Egypt, and he and his people were mushriks. So Yoosuf performed whatever justice and good he was able to and called them as far as possible to correct eemaan."