Camilla, 76, who looked elegant in a blue patterned velvet gown, attended The Rifles biennial ceremony at the Guildhall in the City of London.
The Queen, who is Colonel-in-Chief of the regiment, was joined by the late Queen Elizabeth II's cousin, Prince Richard, the Duke of Gloucester and his wife, Birgitte, Duchess of Gloucester, who are the unit's Royal Colonels.
Speaking about the intervening period since she attended the event in 2021, the Queen told the assembled officers and Riflemen: “The last two years have showcased The Rifles magnificently.
“From the familiar challenges we, as a regiment, so readily succeed at, through to the rare duty of gliding down the marching gears at the coronation with such panache.”
She added: "Much has happened since we last gathered here at the Guildhall – from a full-scale invasion, the largest seen in Europe since the Second World War, through to the first coronation in 70 years.
“I note with pride that Riflemen have boldly remained in the vanguard, doubling towards each of these challenges.”
Camilla has personal links to The Rifles though her late father Major Bruce Shand, who she said would have wanted her to “commend your loved ones, who make your work possible and keep the home fires burning”.
Two Battalions of The Rifles form part of the celebrated 7th Infantry Brigade, otherwise known as the Desert Rats, with whom Major Shand served.
The Queen referenced the historic coronation which took place on 6 May, saying: “I must say, to see 4,000 soldiers, sailors, and airmen on parade was quite extraordinary, with the three cheers in the garden of Buckingham Palace quite unforgettable.
"My thanks goes out to 1 Rifles and the Band and Bugles of The Rifles for representing the Regiment with such pride and distinction – the dashing green tunics were a welcome contrast to all the redcoats, lace and frills."
Meanwhile, the King began his two-day visit to Dubai on Thursday, ahead of his opening address at Cop28 on Friday.
The Prince and Princess of Wales also stepped out for the Royal Variety Performance at London's Royal Albert Hall on Thursday. They were joined by Sweden's Crown Princess Victoria and Prince Daniel.
Listen to the latest episode of HELLO!'s A Right Royal Podcast, where we're looking at the life-changing unions of those who have been married into one of the most famous institutions on the planet.