The pair aged 15 and 16 were seen rolling the joint on a set of steps within a downtown police precinct.
A search conducted shortly afterwards revealed that the 16-year-old was carrying scales and a number of baggies containing marijuana.
The teen was arrested on suspicion of drug charges and will now appear before a juvenile court.
A police spokesperson said the precinct was physically accessible to the public but that entry was prohibited, the news site 20 Minuten reported.
The entry to the area is clearly marked at one access point but someone entering from other points may not realise they were in a prohibited zone, the spokesperson said.
The two boys claimed “not to have realised they were in a police zone”.
But the spokesperson added he was surprised they hadn’t noticed the nature of the parked cars in the area.