President Reagan has signed a secret directive requiring thousands of administration officials, including many in the State Department and perhaps some Cabinet members, to submit to polygraph tests as part of a counterespionage crackdown throughout the government.

Reagan signed the "national security decision directive" Nov. 1, according to White House spokesman Larry Speakes, and it applies to officials with access, or those seeking access, to "sensitive compartmented information."

A General Accounting Office survey last year found that 4,550 State Department employes and contractors and 122,000 Defense Department employes and contractors had access to such information. Another 48,000 Pentagon employes were cleared for other highly classified programs that required "special access." Speakes said the directive also covers this category.

Such information falls in classification categories beyond "top secret" where access is restricted to those who work on the program or have a need to know because they have a policy-making role.

Tens of thousands of federal employes in the Central Intelligence Agency, National Security Agency and other intelligence operations already are subject to regular polygraph exams.

These seek to discover not only espionage activity but also sexual patterns, drug use and economic problems that might make the employes vulnerable to blackmail or some other form of compromise by foreign intelligence services operating in this country and abroad.

Speakes emphasized that polygraph tests authorized in Reagan's order "are not intended to be intrusive on an individual's life style but will focus on counterespionage and counterintelligence questions." He said he assumes some Cabinet members could face tests.

The directive also spelled out new restrictions on Soviet-bloc diplomats in this country aimed at reducing the number of foreign intelligence officers who pose as diplomats. It is further aimed at requiring them to make travel arrangements through the State Department so the FBI can more easily track them, officials said.

There was confusion yesterday about the breadth of the directive and whether it also will be used to investigate news leaks. It remains classified although some details were leaked to the Los Angeles Times.

At the State Department, where Secretary George P. Shultz has been known to oppose introduction of polygraphs in the policy-making bureaucracy, department spokesman Charles E. Redman said he does not know whether Shultz would submit to such a test.

In a joint statement yesterday, the chairman and vice chairman of the Senate Select Committee on Intelligence said, "We strongly support the president's decisions to impose new controls on the hostile intelligence presence in the United States and to improve security awareness within the government."

As for the polygraph program, however, the senators, David F. Durenberger (R-Minn.) and Patrick J. Leahy (D-Vt.), said, "Senior executive branch officials have expressed divergent views on the desirability of such a polygraph program."

The two said they will thoroughly assess how the program is implemented and expressed concern that "the most stringent quality controls" be used "to prevent mistakes that would jeopardize national security or the reputations and careers of individuals."

In a similar vein, Allan Adler, legislative counsel to the American Civil Liberties Union, called the directive "a questionable expansion" of polygraph usage in government.

He noted that a Pentagon program to administer the tests to as many as 3,500 officials involved in highly classified programs is being evaluated and has been hampered by a shortage of experienced polygraph operators.