Nope. Entering a restricted area is always illegal unless you've been given access by a mission giver. You can, however, do quite a bit by being sneaky and not getting seen
This will point the way:
https://forums.frontier.co.uk/threads/the-definitive-stealth-guide.579192/
Just a little clarification here - there's two separate things in play.
Restricted area is an area marked off by the holographic "police tape".
Secure area is a building with doors that require an appropriate clearance level.
You can enter the secure area through the door if you have the clearance for it - doesn't matter if you obtained it legally or via credentials cloning - nobody will give you fuss.
You can stroll around, workers will even greet you as a new coworker and nobody will mind unless you're caught stealing or something.
Restricted area on the other hand is ALWAYS illegal to enter, even if you have the highest clearance and you will immediately be shot (at) on sight. So sneakiness is crucial.