Michelle Obama, seen at the White House event Monday for her Joining Forces program, spoke optimistically about hopes for her veteran-advocacy efforts surviving into the Trump administration. (Chip Somodevilla/Getty Images)

Michelle Obama struck a tone of bipartisanship Monday in her first public remarks since the election — at an event highlighting one of the signature advocacy programs she dearly hopes will survive her departure from the White House.

“I just want to take a moment to echo what my husband said last week in regard to the results of our election,” the first lady said at a summit on ending veteran homelessness. “He said that we are all on one team. Not Democrats first or Republicans first, but we are Americans first.

“As I look around this room, I deeply feel the truth in those words,” she added. “I see people here who belong to all different parties, maybe no party at all. When it comes to supporting our American heroes, none of that matters.”

Mrs. Obama, who campaigned fiercely against Donald Trump this fall, has also made time in her final weeks as first lady to hold a handful of events intended to cement her legacy.

At Monday’s event, she hailed the five-year anniversary of Joining Forces, an effort she founded with Jill Biden. Among its achievements, she said, were new programs that have provided shelter for veterans at risk of homelessness; and an initiative to encourage companies to hire former servicemembers that has helped 1.5 million veterans and their spouses to land jobs or training.

But despite her effort to lend some permanence to her programs — in the case of the White House kitchen garden, she literally enhanced it with stone and steel infrastructure — there is nothing to guarantee her successor will follow her lead.

Melania Trump has said she will focus on cyberbullying as first lady, and although she has said she admires Obama, she will have carte blanche to shape her own programs. Her professed desire to clean up Internet culture drew mockery in light of her husband’s own habit of vulgar and bellicose Twitter posts. In an interview alongside the president-elect for “60 Minutes,” she said that she has at times discouraged his social media habits.

“I will stay true to myself. I’m very strong and — tough and confident,” Mrs. Trump said of becoming first lady. “I will listen myself and I will do what is right and what feels to my heart.”

Unlike the presidency, the role of first lady is malleable. Its duties are not defined in the Constitution, and the women who have taken it on shape it to suit their own interests.

“Everything we do is by choice,” Obama told Vogue in an interview published last week. “I could have spent eight years doing anything, and at some level, it would have been fine. I could have focused on flowers. I could have focused on decor. I could have focused on entertainment. Because any first lady, rightfully, gets to define her role. There’s no legislative authority; you’re not elected. And that’s a wonderful gift of freedom.”

Historically, first ladies have served as a kind of White House hostess — choosing china and holiday decor — while also working in their areas of interest. As the spouse of the commander in chief, supporting military families during a time of war is typically a given.

Obama, however, said she had wanted her program to be more than a gesture of goodwill. She lauded the decrease in homelessness among veterans, which she and her team had pushed in meetings with governors.

She has also tried to build interest in her programs by appearing on television shows, including the dramas “Nashville” and “NCIS” and by opening the White House to provide a platform to discuss the issues.

As part of the gathering in the East Room on Monday, the first lady was introduced by Wendell Banks, a formerly homeless veteran in his 70s. Banks said he sought housing because he heard about the White House’s effort. Obama called him a role model and encouraged advocates to support others who have fallen on hard times after serving in the military.

“We are absolutely on our way to solving this problem, and we cannot let up for a single minute,” she said. “What we’ve all achieved so far should be just the beginning. We should expect that any presidential administration that comes after us — God, I hope they far surpass what we’ve accomplished. I want to look back in . . . 20 years and say ‘Man, what we did in the Obama administration, it only scratched the surface.’ ”

Obama said she did not care whether the next administration renamed her program supporting military families, as long as it continued.

“We have no pride in credit,” she said. “We just want the bar to be high.”