The diplomatic hailstorm that burst over the Carter administration in the last week caught the President and his associates by surprise because they did not foresee the political consequences of their diplomatic maneuvers, according to informed sources.

In a series of interviews, administration sources said they had carefully planned the week's shifts in policy toward the Middle East - shifts that infuriated many of Israel's supporters, and gave the Soviet Union a revised role in Middle East diplomacy.

Many of these officials said that in time, the events of this week will be seen as positive developments in the search for a Middle East peace settlement. Critics of the administration sharply disagreed.

The Carter administration's decision to reinflate the Soviet role grew out of the President's strong desire to reconvene the Geneva peace conference this year, informed sources said.

The unexpected revival of apparent Soviet-American cooperation in the Mideast also grew out of - or at least coincided with - a desire to show the Soviets that the Carter administration could work cooperatively with them despite the rocky beginning in their relations earlier this year.

President Carter and the small band of aides who secretively executed the diplomatic surprises of the past week did not anticipate the strength of the reaction they provoked from Israel and its American friends, informed sources said. They may also have underestimated the right-wing opposition to their revival of the Soviet role in the Mideast.

The President's political aides - who might have been able to worn him of the likely reaction of American Jewry to his initiatives - were cut out of the diplomatic planning. Hamiliton Jordan, Carter's chief political lieutenant, learned of the Soviet-American statement from news reports last Saturday - he had no advance warning. The same was true, according to informed sources, for Mark Siegel, Jordan's aide and Carter's designated liaison with Jewish groups and Stuart E. Eizenstat, the President's domestic affairs adviser, who has taken an interest in Mideast affairs.

This was not the first time that a major foreign policy decision was held tightly within a small group at the top of the Carter administration. Indeed, this has been the rule, not the exception, since the new President took office in January.

The idea of a joint statement with the Soviets apparently took shape in the mind of Secretary of State Cyrus R. Vance during his tour of the Middle East in August. According to sources, he first broached it to the Soviet ambassador in Washington, Anatoliy F. Dobrynin, soon after his return from that trip.

Since the early weeks of the Carter administration, the United States and Soviet Union - co-chairmen of the dormant Geneva Middle East peace conference - exchanged monthly "briefings" on the Mideast situation. The August session between Vance and Dobrynin was one of these.

Vance reportedly decided that his August trip marked the end of the "exploratory stage" of his Middle East diplomacy, and although it did not produce any breakthroughs, he, the President and Zbigniew Brzezinski, Carter's national security adviser, are said to have agreed that the time had come to try to do something to reactivate the Geneva conference.

Carter had repeatedly said that he wanted a Geneva conference during 1977 - meeting this goal became the overriding administration objective. Not long before Vance toured the Middle East, the President repeated it in a meeting with Rep. Sideny R. Yates (D-Ill.), one of Israel's most important friends in the House of Representatives.

Carter, Yates recalls, said he wanted to convene the Geneva conference during 1977 because he would have to turn his attention to other foreign policy issues in 1978, and he hoped the Middle East countries could be engaged in peace talks before he did turn to other topics.

(Israelis and American friends of Israel this week attacked that arbitrary deadline as bad diplomacy. Nothing that the December, 1977, deadline was mentioned specifically in Saturday's Soviet-American statement, the Washington representative of a large Jewish organization called this "one of the crudest and the saddest things in all of this.")

The administration, it is felt, always regarded Palestinian representation at a peace conference as the key issue.The Arab states have recognized the Palestine Liberation Organization as the "sole legitimate" representative of the 3 million Palestinians, and the Soviets have staunchly supported (and financed) the PLO.

Israel, however, refuses to deal with the PLO, noting its repeated statements that it did not recognize the legitimacy of the state of Israel. The United States has never dealt with the PLO directly, but the Carter administration took several steps to soften the U.S. position.

After their expulsion from Egypt in 1972, the Soviets have not had a surrogate in the Middle East. But they remain arms suppliers to the Arabs and sponsors of the PLO.

The Carter administration reckoned that the Soviets were weak in the region, but retained the capacity to "make mischief" - to sabotage American peacemaking efforts. Because of their closeness to the PLO, the Soviets were in an especially good position to make mischief on the question of Palestinian representation at Geneva.

Vance's idea - expressed in August - that the time might be right for a Soviet-American statement of some kind evolved slowly but steadily into last Saturday's statement. Dobrynin and the State Department pursued the notion in connection with Foreign Minister Andrei A. Gromyko's planned visit to Washington on Sept. 22. The strategic arms limitation talks were to be the principal topic during that visit, but both sides also wanted to discuss the Middle East.

At first, it is said, the United States favored some sort of joint communique after Gromyko saw Carter. But, perhaps at Soviet urging, it was decided that the joint statement on the Middle East could be something larger than that. Sometime in September the Soviets presented a draft joint statement.

The United States dissected the Soviet draft, it is said, and produced its own alternative, one based on the structure of the Soviet draft but with substantially different language. Last Friday, when Vance and Gromyko met in New York, they had before them a document including some agreed sections, and several disputed ones.

The document they finally agreed on and released Saturday has been subject to a wide variety of interpretations. The statement called for an end to "the state of war" and its replacement by "normal, peaceful relations" among Mideast nations, Israeli withdrawal from territories occupied in the 1967 war (but no specifics on which territories), and recognition of the "legitimate rights" of the Palestinian people.

According to the administration, this statement was a natural extension of what President Carter had been saying all summer and fall. Administration sources say the Soviets made concessions in the statement by calling for normal relations between Israel and its neighbors, by avoiding a demand for total withdrawal from occupied territory, and by omitting any mention of the PLO.

Israeli diplomats traveling with foreign secretary Moishe Dayan said after the statement was released Saturday night that it was not helpful, but not catastrophic either.

But others in Israel and numerous American friends of Israel reacted violently to the use of the phrase "ligitimate rights" of the Palestinians. They charged that this was a PLO and Soviet code word that implied recognition of a Palestinian state, and perhaps even of Palestinian claims on Israeli territory.

These people also criticized the ommission of any reference to the two basic U.N. Security Council resolutions on the Middle East which guarantee basic Israeli rights.

According to official sources, the phrase "legitimate rights of the Palestinian people" was actually what the United States sought in the statement. The Russians, it is said, wanted to refer to the "national rights and interests" of the Palestinians, but agreed to the American phrase.

(The phrase had previously been recognized as a shade removed from the PLO-Soviet line, at least by some. The European Economic Community used "legitimate rights" in that way last year.)

The furor provoked by the wording of the statement apparently convinced Carter to make conciliatory, reassuring remarks in his speech Tuesday to the United Nations. Later that night he and Vance spent long hours with Dayan negotiating a new "working paper" on the convening of a Geneva conference. Dayan expressed satisfaction with this new document, and pro-Israeli criticism of the President subsided.

"They were burned," said one influential Jewish activist in Washington. Others in the informal pro-Israel lobby also said the administration had been forced to retreat.

Administration officials expressed hope that despite the topsy-turvey week, they had made genuine progress toward convening the Geneva conference. They said at least the Soviets were now committed to help.

But Soviet's new status also created apparent political and diplomatic problems for the administration, problems that could linger. Hard-line elements in Washington saw the changed Soviets status as an ominous sign. Some of them - and some Israelis - said they smelled some sort of deal involving SALT or other Soviet-American issues. The administration denied this.