Michelle Obama said the "lean in" approach for women in the workplace advocated by Facebook's chief operating officer, Sheryl Sandberg, wasn't always enough for women.

She said the idea that women could have it all at the same time was "a lie."

"It’s not always enough to lean in, because that s--- doesn’t work all the time," Obama said.

s--- Sandberg's approach has been criticized for suggesting that individual women, rather than widespread policy changes, have to be the solution to workplace inequality.

Michelle Obama has criticized the "lean in" strategy advocated by Facebook's chief operating officer, Sheryl Sandberg, as insufficient for women trying to excel in their careers.

"That whole 'so you can have it all.' Nope, not at the same time," Obama said at an event for her book "Becoming" in New York, New York magazine reported.

"That's a lie. And it's not always enough to lean in, because that s--- doesn’t work all the time."

Sandberg advocated in her 2013 book, "Lean In," that women take charge in the workplace. It encouraged women seek to supercharge their careers by improving their negotiation tactics, striving to fill leadership roles at work, and taking control of their professional life.

Read more: Here are 25 things we learned from Michelle Obama's new memoir, 'Becoming'

Obama quickly apologized for swearing, New York magazine said. "I forgot where I was for a moment!" she said.

Obama's comments are not the first criticism of Sandberg's approach, which some has said puts the burden on women, rather than widespread policy changes, to solve workplace inequality.

In a study this year, a group of Duke University psychology professors used 2,000 participants to test the lean-in approach and how it worked with structural and systemic disadvantages women face in the workplace.

One group of women read excerpts from "Lean In" and listened to portions of Sandberg's TED talks that focused on how women should be more confident in the office.

Facebook's chief operating officer, Sheryl Sandberg. Reuters

Researchers found that they ended the trial with the belief that women could end workplace inequality but "were also more likely to believe that women are responsible for the problem — both for causing it, and for fixing it."

Read more: 5 years after Sandberg's famous book told women to 'lean in,' it appears that advice may have mixed results

Sandberg addressed the criticism that her book left out underprivileged women back in 2016, telling CBS, "I did not really get how hard it is to succeed at work when you are overwhelmed at home."