Multiple realities(covers information from several alternate timelines)
An identification card was a document carried by a person for identification purposes.
Gary Seven possessed several counterfeit ID cards as part of his undercover mission in 1968. They included cards from the Central Intelligence Agency, National Security Agency, Federal Bureau of Investigation, and the New York City Police Department. (TOS: "Assignment: Earth")
Employees of Mercy Hospital in 1986 San Francisco wore ID badges. (Star Trek IV: The Voyage Home)
In the 2020s on Earth, civilians used identification cards such as UHC cards and transit passes to avoid ending up in San Francisco's Sanctuary Districts. (DS9: "Past Tense, Part I")
In 23rd century Starfleet practice, identification cards were carried by Starfleet personnel. The ID card showed a person's name and service number, as well as their assignment and division.
In an alternate timeline, Starbase Yorktown featured Public transporters that required an ID scan to operate. (Star Trek Beyond)
Identification cards could be created aboard Starfleet starships, and they were sometimes necessary to gain access to certain areas, like a ship's shuttlebay. (TAS: "Mudd's Passion")
Federation security agents used ID cards to identify themselves in 2285. (Star Trek III: The Search for Spock)
After having traveled back in time to 1986 from 2286, Pavel Chekov's ID card was seized by the United States Navy and read aloud by an FBI agent. The agent did not believe the information on the card, including the fact that Chekov represented Starfleet and the United Federation of Planets. (Star Trek IV: The Voyage Home)
On Enara Prime, Regressives wore this device around their neck. It could be checked to confirm their identity. (VOY: "Remember")