New York/Hong Kong/Washington CNN Business  — 

Walmart is partnering with Microsoft in an attempt to buy TikTok, as the popular yet embattled short-form video app seeks a US buyer amid intense political scrutiny.

The retail giant told CNN Business Thursday it is participating in the negotiations with Microsoft over a potential deal. CNBC was first to report the effort by the two companies.

Walmart said its interest in TikTok stems from the way the app has “integrated e-commerce and advertising capabilities in other markets” and could bolster its access to consumers.

“We believe a potential relationship with TikTok US in partnership with Microsoft could add this key functionality and provide Walmart with an important way for us to reach and serve omnichannel customers as well as grow our third-party marketplace and advertising businesses,” Walmart said in a statement. “We are confident that a Walmart and Microsoft partnership would meet both the expectations of US TikTok users while satisfying the concerns of US government regulators,”

The announcement comes hours after TikTok CEO Kevin Mayer quit his job as the the video-sharing app faces criticism from President Donald Trump over its ownership by a Chinese company, Bytedance.

“In recent weeks, as the political environment has sharply changed, I have done significant reflection on what the corporate structural changes will require, and what it means for the global role I signed up for,” Mayer said in a memo to employees that was obtained by CNN Business. “It is with a heavy heart that I wanted to let you all know that I have decided to leave the company.”

In his letter, Mayer said to expect “a resolution very soon” — a phrase indicating that a deal could be reached within the next week, according to a person familiar with the talks.

TikTok hired Mayer, a former top Disney executive, less than four months ago to run the app, which is the first owned by a Chinese company to gain significant traction in western countries. In addition to his CEO responsibilities, Mayer became chief operating officer of ByteDance, TikTok’s parent company.

Since then, though, TikTok has come under fire from the US government, and Trump has threatened to ban the app if it isn’t sold by ByteDance.

“We appreciate that the political dynamics of the last few months have significantly changed what the scope of Kevin’s role would be going forward, and fully respect his decision,” a TikTok spokesperson said in a statement.

In his own memo to employees, ByteDance founder Zhang Yiming said he understood “that the political circumstances we are operating within could have significant impact on [Mayer’s] job in any scenario.”

Zhang said Mayer spoke to him before quitting and that he wished Mayer well.

“I want all of you to know that I really appreciate the endless hours that you have worked, shutting out the noise around us to focus instead on our mission and what we are building for those who rely upon our platform,” Zhang wrote. “The entire team is doing an incredible job, competing effectively against some of the biggest technology companies in the world to win the hearts and minds of users and brands, by offering a truly unique online experience.”

Even before Trump issued executive orders calling for TikTok’s ban, the company was rethinking its corporate structure. The Wall Street Journal reported in early July that ByteDance was considering establishing a headquarters for the video app outside of China or a new management board to distance the service from the country. A TikTok spokesperson told CNN Business at the time that it was “evaluating changes.”

Mayer’s departure is a “huge setback for the company,” said Edith Yeung, who spent years investing in Chinese companies with venture capital firm 500 Startups. She is a partner with Race Capital, investing mostly in US firms.

“[A] leader cannot jump ship in the most critical time for a company,” she added.

According to Trump’s executive orders, TikTok poses a national security threat because the app collects a lot of data on users, which “threatens to allow the Chinese Communist Party access to Americans’ personal and proprietary information.”

The move against TikTok is part of an escalating US-China tech war that has already ensnared other Chinese apps and tech firms, such as Tencent-owned WeChat and Huawei.

TikTok has sued the Trump administration over the initial executive order, calling it “heavily politicized.” The company said Trump’s order illegally rests on emergency powers law in ways that do not apply to TikTok. The company has also said that it stores data on its US users in the United States and in Singapore, and that it would refuse any request by the Chinese government for US user data.

TikTok has 100 million users in the United States. The company has explored selling its US business, which industry experts say is worth between $40 billion and $50 billion, to Microsoft and reportedly to Oracle as well.

Microsoft said it is exploring a deal to buy TikTok’s operations in Canada, Australia and New Zealand, as well as the US business.

“The role that I signed up for — including running TikTok globally -— will look very different as a result of the US Administration’s action to push for a sell off of the US business,” Mayer said in the memo to employees. “I’ve always been globally focused in my work, and leading a global team that includes TikTok US was a big draw for me.”

ByteDance launched the Chinese version of TikTok, called Douyin, in 2016. The international version debuted the following year and has grown to become one of the most popular social media apps in the world. As of July, TikTok said it had nearly 690 million global monthly active users.

That still trails Facebook’s 2.7 billion monthly active users, but the app is also considerably younger than its US rival. By August 2020, TikTok said it had surpassed two billion global downloads.

Vanessa Pappas, the former YouTube executive who joined TikTok last year to become general manager of North America, Australia and New Zealand, will serve as interim head for TikTok globally, according to Mayer’s memo.

Pappas tweeted Thursday that she was “proud and humbled” to take her new role.

“It’s truly amazing what we’ve accomplished in 2 years, I have no doubt what we can accomplish in this next chapter!” she said.

If Mayer had stuck it out, “he would be running one of the biggest social media companies in the world,” Yeung said, though she added that “no American would blame him for quitting.”

“I wish he would hang in there,” she said. “He could change the course of China-US tech history. Oh well.”

CNN Business’ Sara Ashley O’Brien contributed to this report.