Nine countries voted against the resolution, while as many as 35 countries abstained.
India's decision to vote against American recognition of Jerusalem as the Israeli capital comes a day after Trump warned countries against opposing the US position.
India did not speak on the floor of the Assembly in New York, but after Trump recognised the holy city of Jerusalem as the capital of Israel, it had said that its Palestine position was independent and consistent.
The UN General Assembly resolution moved by Turkey and Yemen stressed that Jerusalem was a final status issue to be resolved through negotiations.
More From This Section
It demanded that all States comply with Security Council resolutions regarding Jerusalem, and not recognise any actions or measures contrary to those resolutions.
In his address to the UN general Assembly, Turkish Foreign Minister Mevlut Cavusoglu said that Trump's decision was an outrageous assault to all universal values.
"This is the main parameter and only hope for a just and lasting peace in the region. However, the recent decision of a UN Member State to recognise Jerusalem, or Al-Quds, as the capital of Israel, violates international law, including all relevant UN resolutions," Cavusoglu said.
The eight countries that joined the US in voting against the Turkish resolution were Honduras, Israel, Marshall Islands, Micronesia, Nauru, Palau, and Togo.
Among the major countries who abstained the voting were Australia, Bhutan, Canada, Columbia, Hungry, Mexico, Panama, the Philippines, Poland and Uganda.
"The United States will remember this day in which it was singled out for attack in the General Assembly. We will remember it when we are called upon to, once again, make the world's largest contribution to the United Nations," Haley told the General Assembly.
"America will put our embassy in Jerusalem. That is what the American people want us to do, and it is the right thing to do. No vote in the United Nations will make any difference on that. But this vote will make a difference in how Americans view the UN," the top American diplomat said.
"Let them vote against us, we'll save a lot. We don't care. This isn't like it used to be where they could vote against you and then you pay them hundreds of millions of dollars and nobody knows what they're doing," Trump told reporters at White House yesterday.
Early this week, the US had vetoed a similar resolution in the Security Council. The resolution passed by the General Assembly has no legal implications on the UN member countries.
Trump praised Haley for taking a tough position on Jerusalem at the world body yesterday and warned the countries who voted against the US that America will not be "taken advantage" of anymore.
He was referring to the isolation of the US in the UN Security Council when all 14 members of the apex body joined hands against Trump's recognition of Jerusalem as capital of Israel.