Speaking shortly after the vote confirming the new coalition, Obama said Israel's long-term security would be best served by reaching an agreement to live alongside a recognized Palestinian state.
"I continue to believe a two-state solution is absolutely vital for not only peace between Israelis and Palestinians, but for the long-term security of Israel as a democratic and Jewish state," Obama told a Camp David news conference.
"I know that a government has been formed that contains some folks who don't necessarily believe in that premise, but that continues to be my premise," he said.
"That prospect seems distant now, but I think it's always important for us to keep in mind what's right and what's possible."
The coalition groups Likud, which won 30 seats in the election, with the center-right Kulanu (10 seats), Jewish Home (eight) and two ultra-Orthodox parties: Shas (seven) and United Torah Judaism (six).

Opposition head Issac Herzog, seen here in Tel Aviv on December 10, 2014, firmly rejected any notion of joining Netanyahu's government. (AFP/Jack Guez, File)
Likud members were handed portfolios during a round of bargaining with Netanyahu that lasted well into the Thursday parliamentary session.
Defense Minister Moshe Yaalon was to keep his portfolio, as was Yisrael Katz, who has served as transport minister since Likud won the 2009 election.
Katz will also receive the intelligence portfolio formerly held by Yuval Steinitz, who will become energy minister and coordinate Israel's position on Iran and its nuclear program.

Palestinian children play amid the rubble of their house, on May 11, 2015, which was destroyed during the 50-day war between Israel and Hamas militants in the summer of 2014, in the Eastern Gaza City Shujaiya neighborhood. (AFP/Thomas Coex, File)
The premier will remain foreign minister and Tzipi Hotovely becomes deputy foreign minister. Hotovely rejects establishing a future Palestinian state, has called to annex the West Bank and make Palestinians Israeli citizens.
Gilad Erdan, the highest ranking Likud member after Netanyahu, did not receive a portfolio after refusing the premier's proposal to be internal security minister.
The new economy minister will be Arye Deri, head of the ultra-Orthodox Shas party who was imprisoned in 2000 for two years for corruption and breach of trust, felonies committed while interior minister.