This was not the first time that the Defense Department had been compelled to urge members of the military to remove a popular app from their phones.

In 2016, the Defense Department banned Pokémon Go, the augmented-reality game, from military smartphones. But in that case, military officials cited concerns over productivity and the potential distraction hazards of pursuing the virtual Pokémon while driving or walking. The Canadian military also grappled with Pokémon Go.

The concerns over TikTok center on cybersecurity and spying by the Chinese government.

In a November blog post on TikTok’s website, the general manager of TikTok US, Vanessa Pappas, wrote that data security was a priority and that the company wanted to be as transparent as possible for stakeholders in the United States.

The blog post came as the United States government opened a national security review of a Chinese company’s acquisition of the American company that became TikTok.

“As we have said before, and recently confirmed through an independent security audit, we store all US user data in the United States, with backup redundancy in Singapore,” Ms. Pappas wrote. “TikTok’s data centers are located entirely outside of China.”

In October, Senators Chuck Schumer and Tom Cotton, Democrat of New York and Republican of Arkansas, sent a letter to the acting director of national intelligence, Joseph Maguire, calling for an assessment of national security risks posed by TikTok and other China-based content platforms.

The senators said Chinese companies must comply with a “vague patchwork” of intelligence, national security and cybersecurity laws that have no mechanism for appealing decisions of the Chinese Communist government.