Erdogan pointed out the United Nations Security Council Resolution 478 (in 1980), which is binding upon all member states, and which calls for shifting embassies out of Jerusalem.
https://en.wikipedia.org/wiki/United_Nations_Security_Council_Resolution_478
United Nations Security Council Resolution 478, adopted on 20 August 1980, is one of seven UNSC resolutions condemning Israel's attempted annexation of East Jerusalem. In particular, UNSC res 478 notes Israel's non-compliance with UNSC res 476[1] and condemned Israel's 1980 Jerusalem Law which declared Jerusalem to be Israel's "complete and united" capital, as a violation of international law. The resolution states that the Council will not recognize this law, and calls on member states to accept the decision of the council. This resolution also calls upon member states to withdraw their diplomatic missions from the city.
The resolution was passed with 14 votes to none against, with the United States abstaining.
....
The subsequent advisory opinion of the International Court of Justice expressed the view that all States are under an obligation not to recognize the illegal situation in and around East Jerusalem.[10]
Most nations with embassies in Jerusalem relocated their embassies to Tel Aviv, Ramat Gan or Herzliya following the adoption of Resolution 478. Following the withdrawals of Costa Rica and El Salvador in August 2006, no country maintains its embassy in Jerusalem.
https://en.wikipedia.org/wiki/United_Nations_Security_Council_Resolution_478
United Nations Security Council Resolution 478, adopted on 20 August 1980, is one of seven UNSC resolutions condemning Israel's attempted annexation of East Jerusalem. In particular, UNSC res 478 notes Israel's non-compliance with UNSC res 476[1] and condemned Israel's 1980 Jerusalem Law which declared Jerusalem to be Israel's "complete and united" capital, as a violation of international law. The resolution states that the Council will not recognize this law, and calls on member states to accept the decision of the council. This resolution also calls upon member states to withdraw their diplomatic missions from the city.
The resolution was passed with 14 votes to none against, with the United States abstaining.
....
The subsequent advisory opinion of the International Court of Justice expressed the view that all States are under an obligation not to recognize the illegal situation in and around East Jerusalem.[10]
Most nations with embassies in Jerusalem relocated their embassies to Tel Aviv, Ramat Gan or Herzliya following the adoption of Resolution 478. Following the withdrawals of Costa Rica and El Salvador in August 2006, no country maintains its embassy in Jerusalem.