26-year-old Joshua Kanda twice sold packets of sucrose to clubbers in Newcastle after telling them that it was the party drug.
Kanda made £60 from selling the substance between June and July 2018, the court heard.
Now, he's been given a 12-month community order, including a two month curfew between 07:00am and 07:00pm after pleading guilty to two counts of fraud and two of supplying a class B drug.
That last charge relates to incidents between July and September of 2018 when officers spotted him supplying a small amount of cannabis to two people.
They also tested the powder that he'd been selling, which is where his ruse was discovered.
Kanda, from Grosvenor Road in Jesmond, was being investigated as part of a wider drugs operation run by Northumbria Police, prosecutor Sue Baker said.
She explained: "Evidence in relation to Mr Kanda relates to four different transactions in 2018.
"On two occasions, the defendant has supplied MDMA to two persons but it was sucrose and, on two other occasions, he supplied cannabis.
"Those cannabis deals were worth £20 each."
Kanda received a lighter sentence after his defence argued that he was at a 'low ebb' at the time of his crimes and pointed to evidence that he had committed no other crimes since.
He moved up to Newcastle from London aged 12 following a difficult childhood, the court was told.
Michael Crowe, speaking in his defence, said: "Essentially, he's ripped-off some partygoers by getting them to buy MDMA and then he's handed them sugar.
"It was very small amounts of money involved."
As well as the community order with curfew, Kanda was ordered to pay £85 in costs and a £30 victim surcharge.
MDMA - also commonly known as ecstasy or molly - is a Class A drug used primarily for recreational purposes.
It is illegal in most countries, and has no current approval for medical use anywhere in the world.
Under UK law, possession of MDMA - and other Class A drugs such as cocaine, crack cocaine, heroin, LSD, crystal meth and magic mushrooms - is punishable with up to seven years in prison, an unlimited fine, or both.
The supply and production of any of the above substances can be punished with up to life imprisonment, an unlimited fine, or both.
Chosen for YouChosen for You
Most Read StoriesMost Read