Iran's police chief Esmaeel Ahmadi Moghaddam on Monday criticized officials who "cross red lines" by using banned social media networks, Mehr news agency reported.
Tehran blocks access to popular websites including Facebook, Twitter and YouTube as part of its efforts to stop Iranians from surfing content seen as immoral or undermining the Islamic regime.
But both Foreign Minister Mohammad Javad Zarif and Culture Minister Ali Janati are on Facebook, and even supreme leader Ayatollah Ali Khamenei is believed to have a Facebook page and a Twitter account.
The authorities also provide some private and state-owned companies a "national VPN" service which gives them to access to the Internet.
"The fact that some officials have started to cross red lines gradually and enter spaces prohibited for citizens is not a good thing, and everyone should observe the rules," said Ahmadi Moghaddam.
"By violating the law (themselves), the officials should bear in mind that their actions should not pave the way for others to violate the law," he was quoted as saying on the sidelines of a police cybercrime meeting.
Foreign Minister Zarif regularly updates his Facebook page, where he writes in Farsi and interacts with his more than 750,000 followers. He also posts English messages on his verified Twitter account.
President Hassan Rouhani, a reputed moderate who has an account on Twitter, albeit not a personal one, promised more social freedoms during his election campaign this year.
In September, Rouhani told CNN he planned to reduce restrictions so that "within (certain) sort of moral frameworks that we have for ourselves... we are able to access these social network sites".
Judiciary spokesman Gholam Hossein Mohseni Ejeie also insisted his department was against Facebook since it "promotes corruption and prostitution and publishes articles against public chastity," the official IRNA news agency quoted him as saying.
Iran's civil rights record and censorship is regularly criticized by international watchdogs and Western governments.
According to official figures, of the total population of 75 million in Iran, more than 30 million people use Internet.