I had this problem, the tenants knew i was coming over, they had'nt paid rent. After i left the house they got a restraining order on me.
My gut says you left out a lot; courts don't just issue restraining orders without cause.
That being said, tenants don't have to be present if you gave proper notice. If you didn't last time, try written notice next time with these tenants.
If they're over-due on rent then you have legal cause to commence eviction proceedings--not as retaliation, but as a contractual matter.
READ THIS BEFORE CALLING OR EMAILING ME: I am licensed in the Commonwealth of Virginia, addressing your issue does not create an attorney-client relationship and I AM NOT providing you legal advice. You should speak with an attorney to whom you have provided all the facts, before you take steps that may impact your legal rights. I am not obligated to answer subsequent emails or phone calls unless you have hired me. I wish you the best of luck with your situation.
Debt Collection Attorney
Your right to enter the property is detailed in A.R.S. sec. 33-1343. Specifically subsection C states "The landlord shall not abuse the right to access or use it to harass the tenant. Except in case of emergency or if it is impracticable to do so, the landlord shall give the tenant at least two days' notice of the landlord's intent to enter and enter only at reasonable times." The statute makes no reference that the tenant is required to be present. As the other attorney stated there appears to be much more to this matter.
If the tenant has not paid rent, after providing the statutory five day notice to the tenant you may proceed with an eviction action. You should consult with an attorney that handles landlord tenant issues to proceed with the eviction action.