All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Answering this question requires listing many details and we are unable to do so because we receive many questions, however, we will provide you with general rules as part of the answer for things which we will not mention.
A Muslim in a Muslim country, whether or not he is originally among the citizens of that country, enjoys the same rights as others in general; on top of these rights are:
1-The right to live, and the right to be protected in his own self and wealth, and to guarantee for him the things that preserve his life, like food, clothing, medicine and the like, and protect his honour, dignity and reputation from any abuse.
2- The right of possessing wealth (money) by earning it and spending it in permissible ways, and protecting his wealth from being abused or taken without right, whether that is from the ruler or the citizens.
3- The right of worship and show his religious rites.
4- The right of freedom; it is forbidden to restrict the freedom of expression and action except if they contradict the principles of religion and the general benefits.
5- The right of education and acquiring knowledge according to what his is obliged to learn (Islamically). This is an obligation upon the state. This includes the religious education and other beneficial knowledge which benefits the society.
To conclude if a foreign Muslim does not enjoy the above-mentioned rights and other rights, then the problem is in the prevailing system and not in the religion as in religion everyone who lives in a Muslim country enjoys his rights let alone a Muslim.
Allaah Knows best.