Code Enforcement cannot legally come onto your property without your permission.
The code enforcement officer may come up to your door and knock just anyone else.
But if you ask the code enforcement officer to leave your property then they must do so.
If the code enforcement has no warrant signed by a district judge to be on your property then they must leave or they can be charged with Criminal Trespass after you've warned them.
If they do not leave and they don't have a warrant then call the police on them to have them removed.
I had a code enforcement officer arrested who would not leave my property.
He went around trying to snoop around and was trying to actually get into my locked fence by cutting the lock.
I got him on camera doing so and called the police and he was arrested and charged.
The 4th amendment protects you against unreasonable searches and seizures and a city or town code enforcement officer cannot deprive you of your personal property without due process of the court.
Municipal courts do not have the legal right to issue warrants or arrests which I've found out.
The city has to bring you to court in front of a regular judge in a regular court to be able to seize your property from you.
Most code enforcement go into the job without really knowing the law fully.