Liam Halliday, 20, and Archie Marriott, 18, are accused of having 38 grams of the class B drug cannabis near Huntingdon last Friday with intent to supply.
Halliday did not enter a plea when he appeared before the court.
Marriott, who was also in custody, denied the charge.
Halliday admitted possession of the class A drug cocaine and being concerned in the supply of cannabis in St Ives between August 2020 and March 2021.
He pleaded not guilty to a second charge of being concerned in the supply of cocaine in St Ives.
District Judge Ken Sheraton declined jurisdiction in the matters, which will next be heard at Peterborough Crown Court on December 6.
Halliday, of St Ives Road, Hemingford Grey, was remanded into custody.
Marriott, of Lincoln Avenue, St Ives, was granted bail with conditions to live and sleep at his home address, be electronically tagged for a 9pm-5am curfew, not to contact his co-defendant and not to go to Hemingford Grey