There had been reports that Mir-Hossein Moussavi would make his first public appearance for weeks, as well as former president Mohammad Khatami and former parliament speaker Mehdi Karroubi.
Witnesses said thousands in the crowds were wearing green masks and most of the women wearing headscarves of green, the colour of Moussavi's opposition movement.
Witnesses said Moussavi supporters shouted, 'Allahu Akbar', or 'God is Great', which had in recent weeks turned into a major protest slogan against the government of President Mahmoud Ahmadinejad.
Rafsanjani and Moussavi are fierce opponents of Ahmadinejad and have not acknowledged his re-election in June 12 voting, which was marred by accusations of fraud by the opposition.
Witnesses said the atmosphere around the university was tense and clashes between Moussavi supporters and police could not be ruled out.
Foreign reporters and photographers were prohibited by security officials from covering the Friday prayer ceremony or even staying outside the university to observe.