The United States, confronted by unyielding French opposition, today gave up its hopes of getting the North Atlantic Treaty Organization to endorse formally research on President Reagan's Strategic Defense Initiative.

American and European sources at the spring meeting here of NATO foreign ministers said tonight that when the official communique is issued Friday it will contain no mention of the research effort to build a high-technology shield against enemy missiles.

Secretary of State George P. Shultz had sought the endorsement to demonstrate alliance unity in the face of Soviet efforts in Geneva to link reductions of offensive nuclear weapons to U.S. abandonment of research on the defense system, also known as "Star Wars."

The sources also said the European members of the 16-nation alliance had been unanimous in stressing to Shultz that they want the United States to continue to abide by provisions of the unratified SALT II arms control agreement.

It has been clear since the meeting began yesterday that the allies are relatively confident that Reagan, who is to announce his decision on the SALT II issue Monday, will opt for a compromise approach allowing the United States to contend that is in compliance with the spirit, if not the strict letter, of SALT restraints even if the Soviet Union engages in violations.

Europeans have argued that for the United States to renounce SALT II restraints abruptly would cause a backlash in West European public opinion and impede progress in the Geneva arms talks. This position was summed up publicly today by West German Foreign Minister Hans-Dietrich Genscher, who said: "Neither the observance of the Antiballistic Missiles Treaty nor the respect of the SALT II agreement should be diminished in their value by the Soviet Union adopting an attitude contrary to their spirit and letter."

The United States began sending signals earlier this week that Reagan was leaning toward a SALT II decision that would take into account the concerns voiced by Genscher. As a result, various sources noted, the meeting's major source of contention involved European anxieties about the Strategic Defense Initiative.

The United States, hoping to strengthen its efforts to convince the Soviets that it will not use SDI as a bargaining chip in Geneva, wanted to give the individual endorsements it has collected from various West European leaders an alliance-wide character.

However, French President Francois Mitterrand's government made known its opposition to any endorsement and threatened to put a disclaimer into the communique. In discussions here with French Foreign Minister Roland Dumas, Shultz was unable to budge France.

A senior U.S. official, who declined to be identified, sought to minimize the effect of the decision, saying the French position has been well known for some time and that France recognizes that the United States is free to engage in such research. The official also denied strongly that omission of an SDI endorsement from the communique will give the Soviets the impression that NATO is divided on this issue.