The opinion of most of the grand religious authorities is as under:
If the bank acts as an agent (through a legal contract) on behalf of the client and it is carrying out its contracts in accordance with Islamic laws, there is no problem in taking the interest. However, if it is in the form of a loan it would be haram to lay down a condition for interest and to receive the interest.
Ayatollah Bahjat: People’s deposits with banks and the interest which is given to them by the banks will be halal provided that it has been in accordance with the Islamic criteria and on the basis of Islamic contracts and agreements. For example, the bank can sell a property to the client on the condition that he will lend some money as a loan to the bank.
Ayatollah Wahid Khurasani: If the client does not lay down a condition for interest and he does not consider the bank indebted to him, there is no problem in taking the interest even if [he knows that] the bank gives interest.
 - Ayatollah Khamenei, Answers to Religious Questions (Ajwebat al-Istiftaat), question 1926 and 1940; Ayatollah Noori, Tawzih al-Masail, Current Legal Issues; Ayatollah Tabrizi, Istiftaat, question 2120; Ayatollah Makarem Shirazi, Istiftaat, vo.1, question 1377 and 1383 ; Ayatollah Fazel Lankarani, Jami' al-Masail, vol.1, question 1094 and 1095 and vol.2 question 2003; Ayatollah Saafi, Jami' al-Ahkaam, vol.2, question 1990 and 1991; extracted from Porsman Software.
 - Bahjat, Tawzih al-Masail, issue No. 2283.
 - Wahid Khurasani, Tawzih al-Masail, issue No.2850.