Impersonating a Starfleet officer
The crime of impersonating a Starfleet officer was the act of falsely presenting oneself as a Starfleet officer and using this pretense to falsely act in the name of the service. A person committed this offense by such actions as wearing a Starfleet uniform to deceive others into believing they were a Starfleet officer, issuing orders to legitimate Starfleet personnel, or falsely conducting activities in the name of Starfleet.

In 2151, a time traveler from the 31st century, infiltrated the , posing as a steward named Crewman  for the first few weeks of the ship's voyage. ()

In 2266, the last surviving M-113 creature assumed the appearance of  crew members  and Leonard McCoy while stalking various crew members to consume the salt in their bodies. ()

In 2268, the android Norman posed as a sciences division lieutenant in order to gain control of the  and divert it to the planet Mudd per Harry Mudd's orders. He was able to pass as a Human primarily because he avoided his required physical. ()

In 2368, a Satarran using the alias of Kieran MacDuff posed as the executive officer of the  as part of an attempt to use the starship to destroy the Lysian Central Command. ()

In 2370, William Samuels impersonated a Starfleet officer on Deep Space 9 in order for him to destroy the Cardassian freighter the Bok'Nor, which was docked at the station, for the Maquis. ()

In 2371, The Doctor experienced a delusion due to a kinoplasmic radiation surge. Told by Reginald Barclay that he was actually Lewis Zimmerman, and  was a holographic simulation, The Doctor accused Barclay of being an alien impersonating a Starfleet officer. ()

During the Dominion cold war, various Changelings used their shape-shifting abilities to impersonate Starfleet personnel at key facilities. one Changeling briefly impersonated Doctor Julian Bashir aboard the  in 2371 as part of an unsuccessful attempt to incite a war between the United Federation of Planets and the Tzenkethi. () Two Changeling (possibly the same one) assumed the appearances of Vice admiral Leyton and Chief Miles O'Brien at Starfleet Headquarters on Earth in 2372. The former Changeling claimed there were four of his kind on Earth at the time, not counting Odo. () Another Changeling also posed as Bashir at Deep Space 9 in 2373, this time, apparently, for as long as four weeks. ()

In 2375, the genetically-engineered Humans , Patrick, and Lauren were all charged with impersonating Starfleet officers after they brought Sarina Douglas to Deep Space 9, during which they wore Starfleet uniforms and ordered others such as Nog to contact Julian Bashir. Patrick was dressed as an admiral, Jack as an operations officer, and Lauren as a science officer. Whenever they were questioned about their activities, Patrick answered "That's a stupid question!", which succeeded in continuing the deception. Because they were only trying to get assistance for Sarina, Bashir convinced Benjamin Sisko to ask that the charges be dropped. ()

The following year, the crew of the  discovered con artists Dala, Mobar, and Zar impersonating Voyager officers Kathryn Janeway, Tuvok, and Chakotay, respectively. They were able to do so after deceiving Neelix and Tom Paris into allowing them onto the  where they stole their database and acquired the knowledge of Starfleet within it. They then used this information to impersonate the aforementioned officers and swindle unsuspecting victims. After being captured by the Voyager crew, they were turned over to local authorities for prosecution. ()
Crimes
Starfleet