IT'S BEEN a long time since the Security Council went 15-0 for the United States, and it feels good. But what does this resolution urging the release of the hostages actually accomplish for them? Plainly, it has intensified the debate among the competing power centers in Iran about what to do with the hot potato -- the embassy -- the regime picked up on Nov. 4.

Some in Iran, perhaps including the foreign minister, seem to have been encouraged enough by the resolution's allusion to "the grievances of Iran" and by its appeal for a peaceful resolution to want to nibble further on the possibility of negotiations under Secretary General Kurt Waldheim's aegis. Others, including the students in actual possession of the hostages, insist they'll stay in the bunker until they get back the shah. It could go either way -- an estimate, by the way, that would have been harder to make before the United Nations' vote.

Where is Ayatollah Khomeini in this mess? At the center of it. The key fact in Iran now is that he is being forced to deal simultaneously with two crises -- the foreign one provoked by his sponsorship of the kidnapping of the embassy and the domestic one brought on by his reach for total power. Some people think it was precisely his reach for power -- expressed in a drive for massive ratification of an "Islamic constitution" making him Iran's supreme leader for life -- that led him to whip up the foreign crisis.

If that was so, his strategy backfired badly. For the referendum on the constitution, just concluded, was something of a bust. Apparently it was boycotted by the major non-Persian ethnic groups, by some other ayatollas (some with ethnic links) and by segments of the middle class. In brief, with the international community repudiating his hostage-taking and a politically fortified Jimmy Carter "turning the screws," the ayatollah has been revealed in a test of his own devising as a politician facing his heaviest challenge ever. The virtually full-fledged uprising he currently faces in the Azerbaijan region is only the most conspicuous part of it.

Might he now try to heat up the foreign crisis to cool down the domestic one? If he is tempted to follow this time-worn route, then he has to consider what has happened so far in his confrontation with the United States. Many of his domestic opponents, far from setting aside their grievances for the duration, have been taking advantage of the turmoil for their own ends. By failing to take up the prospect of conciliation offered by the United Nations, in other words, the ayatollah may be risking the disintegration of his country and the loss of his power.