"I hope that Your Excellency’s familiarity with relations between Iran and the United Kingdom, and your only one visit to Tehran greatly contribute to removing the existing obstacles on the path of development of relations between the two countries," Rouhani's congratulatory letter to Johnson read.
Johnson, former UK foreign secretary, took over as prime minister on 24 July after winning the Conservative leadership vote.
Earlier on Sunday, Iran's Foreign Ministry spokesperson and senior nuclear negotiator Abbas Araqchi spoke during the JCPOA meeting in Vienna, condemning the seizure of his country's Grace 1 oil tanker as a violation of the Iran nuclear deal.
On the same day, the UK announced that its second warship, the HMS Duncan, had arrived in the Persian Gulf to escort British vessels until the end of August.
UK-Iranian relations have recently deteriorated after Iran's Grace 1 oil tanker had been seized by the Gibraltar and UK marines over alleged breach of EU anti-Syrian sanctions. Two weeks later the Iranian Islamic Revolutionary Guard Corps seized the UK-flagged Stena Impero oil tanker in the Strait of Hormuz over alleged breach of international maritime regulations.