A soccer player was found to have cannabis in his bedroom when gardai raided his family home.
Conor Noonan (20) was a habitual user at the time but at the "lower end of the supply chain", his solicitor said.
Judge Paula Murphy ordered a probation report and adjourned sentencing to a date next month.
The defendant admitted possessing cannabis and having the drug for sale or supply at his home in Allendale Terrace, Clonsilla, last March 15.
Sgt Maria Callaghan told Blanchardstown District Court that gardai obtained a warrant and searched the defendant's home.
During the course of the search, Sgt Callaghan said gardai found cannabis with a street value of €717 in the defendant's bedroom.
Sgt Callaghan said Noonan made admissions at the scene.
The court heard the defendant had never been in trouble before.
Defence solicitor John Shanley said Noonan came from a respectable family and his father and girlfriend were present in the court to support him.
Mr Shanley said the defendant was a habitual cannabis smoker at the time of the incident.
However, he said the defendant was no longer smoking and now worked six days a week for a cladding company.
He added that Noonan was a keen soccer player and turned out for his local club.
Mr Shanley said the defendant was no longer associating with certain people and he hoped to never come before the courts again.
Mr Shanley also asked the judge to consider leaving Noonan without a conviction.