A convicted thief posed as a landlord when he knocked on a tenant's front door looking for rent money, a court heard.
The victim realised Anthony Carroll (36) was an imposter and called gardai when he saw him jump over a wall into a neighbouring garden.
Judge John Hughes gave Carr- oll a nine-month suspended sentence.
Father-of-two Carroll, of St Attracta's Road, Cabra, pleaded guilty to trespassing at St Theresa's Road and Botanic Road, Glasnevin.
Dublin District Court heard Carroll knocked on the front door of the premises and "stated he was looking for rent money".
The two occupants realised Carroll was an imposter and called gardai. He left the area and was followed by the occupants who saw him climbing a wall into a garden.
That resident also called gardai and the accused was identified and arrested.
He said at the time he was sorry and that he was looking for scrap metal.
Carroll was intoxicated on "benzos" at the time and could not remember the incident, his barrister Glen Lynch said. He had since apologised.
In separate theft cases, a woman socialising in a bar on South Great George's Street last August 17 had her handbag stolen.
It was found in the male toilets with the iPhone and €180 in cash missing.
Carroll was identified when he returned to the premises. He had a different stolen phone on him and dropped another in the back of the patrol car on his way to the station.
He stole another phone from a handbag at the Czech Inn Bar, Essex Street, on June 14, 2017, and stole a bicycle worth €700 from in front of a city centre cafe last November 19.
Carroll had previous theft convictions.
He had been addicted to heroin, crack cocaine and tranquilliser tablets, had relapsed at the time of the offences and was stealing to feed his habit.
He was now sober and wanted to get on a community employment scheme so he could pay compensation.
The judge ordered him to pay €1,500 to the theft victims.