Partition of Palestine was opposed on the ground that it would alienate crucial Arab allies that supplied oil. Fair enough, that did happen. But would federalization really have avoided the issue? Wouldn't it still be opposed fiercely in the Arab world? If it was a "good idea", why was it not adopted?
I might be wrong about the details, feel free to correct.
Partition of Palestine was opposed on the ground that it would alienate crucial Arab allies that supplied oil.
This may have been the reasoning for some in the US, but not all. Some were opposed for other reasons.
George Kennan, for example, certainly raised the points regarding Arab alliances. He also, however, was focused on the actual ability of a proposed Jewish state to defend itself, after the civil war had broken out. He believed the US might be forced, if it supported a Jewish state, to eventually send troops to defend said state from almost certain annihilation. He believed Israel would lose any war, in short, and that the US would find itself unable to resist defending it militarily, which would pose risks geopolitically and militarily with implications beyond just the immediate region given the commitment of troops and power it would take. The CIA, for its part (newly formed at that), did not make a recommendation but strongly suggested that the world's Jews would end up worse off if Israel existed, rather than better.
Of course, there was also the relatively well-known but still insidious (albeit at the lower levels primarily) antisemitism common among staffers in the State Department. This too played a role, according to folks like Richard Holbrooke. I would note however that the idea that supporting Israel is what alienated Arab allies is unlikely. Many of those Arab states, while obviously opposed to Israel, continued to cooperate with the US aplenty, until and unless they found it more lucrative to cooperate with the Saudis. Egypt, for example, did not immediately leave US orbit, and Nasser played both the US and Soviets off one another for a time before choosing the Soviets (as he had likely planned all along, and he also wasn't in power in 1948). Other states like Saudi Arabia continued to sign agreements with the US and work with it, including in oil trade, and while there were bumpy roads they did not solely revolve around Israel and the alliance continued.
But would federalization really have avoided the issue? Wouldn't it still be opposed fiercely in the Arab world?
We have no way of knowing alternate realities. But what I can do is describe what Arab states viewed as "federalization", and why some believed that they could have a better shot at alliances with Arab states if that were implemented over partition.
Federalization involved a proposal for a bicameral legislature. One half would be purely population-based, like the US House of Representatives. The other would be like the US Senate, and have equal numbers of Jews and Arabs. A dispute between the two would go to a committee of a representative from both bodies of the legislature, the head of state, and two members designated by the federal court.
The head of state would be chosen by a majority of both legislative houses. The federal court would have a minimum of 4 Arabs and 3 Jews on it, elected also by the legislature.
To put it bluntly, the plan was unpalatable to Jews, and much of the international community saw it as nothing more than a fancy attempt to create a single Arab state rather than one state for both peoples. Arabs would be the majority of the population, which means they would control more seats overall that could elect the head of state, and the court. Jews would be consigned to forever-minority status. Notably, the plan also suggested that the Jewish sub-state could not accept as many Jews as it wanted from the displaced persons post-Holocaust. It left immigration in the hands of the federal government, which again would be run by Arabs in any scenario visible at the time, and suggested merely that displaced Jews be split up among the nations of the world based on proportion of population by state, with the new state of Palestine accepting a small share based on "absorptive capacity". So Jews abroad would not get their wish to enter the area in the numbers they wanted, and Jews local would be consigned to minority status. The more powerful states were not exactly fans of this. Some for moral reasons, like Truman's personal belief that partition was better, and others for strategic reasons as well, like the USSR's belief that partition would weaken Britain's position in the Middle East more than an Arab state.
It's also worth noting that the committee specifically sent by the UN to study this recommended partition in the majority by far. Federalization was a plan supported by 3/11 members of UNSCOP, while 8/11 supported it (well, Australia abstained to be fair). So it did not have a good report coming out of the visits and investigations UNSCOP itself ran, and ran headlong into Jewish opposition and international opposition as well.
But there's one more wrinkle I haven't mentioned; Arabs opposed this as well. The Arab states said that the creation of a sub-national Jewish "state" under the federal plan was nothing more than a disguise for partition. This was their position when it was re-proposed by Folke Bernadotte, a diplomat attempting to negotiate a truce, in July 1948. Musa al-Alami, a Palestinian Arab official, said that:
[T]he Arab population of Palestine would rise up against both the majority and minority reports. In the case of the majority report, the rising would “command universal support”; as to the minority report, “the rising might still be fairly successful.”
Citing here from 1948 by Benny Morris, p. 50. The Lebanese UN delegation tried to put forward a "federal" proposal based on the minority report, when it began to seem clear that the partition plan would pass the UN General Assembly, but his fellow Arab diplomats did not join in supporting it. There are a variety of reasons that this may have occurred: general opposition, lack of communication from their capitals to the UN offices, belief the plan would actually not pass, and even fear of repercussions from the publics of their countries if they appeared soft on Jewish aspirations for statehood. But given both sides opposed federalization, as did the major powers more broadly (the US and Soviets supported, the UK abstained, and France supported), it makes sense that federalization never took root.