I am a new muslim alhamduillah in the U.S. Someone told me that if I don't have permission to pray from a property owner, or the owner of a business and I pray anyway, that my prayer is invalid. Is this true? I was also told that if a non-mahrem sees me pray, my prayer is invalid, is this true? What if I prayed and didn't know it would invalidate my prayer (unintentional action) would it still be accepted by Allah? I was also told that my prayer would be invalid if someone nearby plays music or sings or says a swear word. Is this true? I searched the site but could not find anything along these lines. Inshallah, you can answer soon, as I work in an office and there is no private place to pray, I have not asked for permission, and they said I could not pray at my desk.
We praise Allaah Who has guided you to Islam, and we ask Him to make you steadfast in following guidance and in faith, for He is All-Hearing, Ever Responsive.
With regard to prayer, it is not necessary to have the agreement of the owner of the organization or business, and you do not have to ask him for permission. Rather you have to perform the prayers even if he does not approve of that, because there should be no obedience to any created being if it involves disobedience towards the Creator, and the command of Allaah takes precedence over the command of anyone else. So you must perform the prayers at the appointed time, because Allaah says (interpretation of the meaning):
“Verily, As‑Salaah (the prayer) is enjoined on the believers at fixed hours”
If you pray without his permission, your prayer is still valid and there is no sin on you.
With regard to some people who are not your mahrams seeing you whilst you are praying, there is no sin on you for that, and your prayer is valid so long as you are covered properly and wearing hijaab. When a woman prays, she must cover all her body except her face and hands, if she is in her own house or among her mahrams. But if she is in a place where non mahrams could see her, she must cover all of her body including the face and hands. We should also note that a woman should try to keep away from places where men and women mix and places that are just for men, especially at times of worship.
If sounds of music, swearing or other haraam sounds reach you whilst you are praying, this does not affect the validity of your prayer, so long as you are able to perform all the necessary and obligatory parts of the prayer. But you should keep away from places where these haraam things are likely to be, as much as possible, especially when performing the prayers, because this is more conducive to having the proper humble and focused attitude, and to pondering the meaning of the words you are reciting.
There is nothing wrong with praying near your desk so long as you are able to perform all the necessary and obligatory parts of the prayer.
We advise you to strive to learn the basic rulings of Islam, especially the prayer. We also appreciate your keenness to learn and your interest. And Allaah is the Source of strength.