Modi, who met with Russian President Vladimir Putin and Chinese President Xi Jinping, held his first bilateral on Thursday with Rouhani.
The talks with Rouhani come as the five permanent members of the UNSC and Germany and Iran are thrashing out details of an agreement to curb Tehran's nuclear programme in Vienna.
"Advancing a significant partnershp. PM @narendramodi meets President @HassanRouhani on sidelines of BRICS/SCO Summits," tweeted external affairs ministry spokesperson Vikas Swarup.
Earlier, he interacted with Indian CEOs and Finance Minister Arun Jaitley.
"BRICS for Business. Indian CEOs interact with PM @narendramodi and FM @arunjaitley first thing in the morning," the MEA spokesperson said.
Modi is in Ufa to attend the Seventh BRICS summit and the 15th SCO summit. India is set to be made permanent member of the Shanghai Cooperation Organisation.