Borrowing from one who stipulates life insurance as a condition of giving the loan
Question

I work in a company that gives interest-free housing loans, but they stipulate that the employee must have life insurance. That is so that the company will take the money it is owed from the insurance company in the event that the employee dies before praying off the loan. Is this loan halaal or haraam? Please advise us, may Allaah reward you with good.
Praise be to Allah.Taking good loans which are prescribed in sharee’ah and which do not involve interest is permissible, but it is not permissible to make that dependent upon conditions which are not Islamically acceptable. That includes the condition mentioned in the question; what renders it unacceptable is the fact that the company stipulates that the person who is borrowing the money is required to take out life insurance. There is no doubt that life insurance – and indeed all kinds of insurance – is haraam, and it is a form of gambling. 
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) said:  
Insurance on one’s life and possessions is forbidden according to sharee’ah and is not permitted, because it involves ambiguity and riba (usury, interest) and Allaah has forbidden all kinds of transactions that involve riba and ambiguity out of mercy towards the ummah and in order to protect them from harm. Allaah says (interpretation of the meaning): 
“Allaah has permitted trading and forbidden Riba”
[al-Baqarah 2:275]
and it was narrated in a saheeh report that the Messenger of Allaah SAWS (peace and blessings of Allaah be upon him) forbade transactions that involve ambiguity. And Allaah is the source of strength. 
Fataawa Islamiyyah, 3/5 
On this basis, it is not permissible to participate in housing loan programs where the company stipulates that the beneficiary must take out life insurance. 
“And whosoever fears Allaah and keeps his duty to Him, He will make a way for him to get out (from every difficulty).
And He will provide him from (sources) he never could imagine. And whosoever puts his trust in Allaah, then He will suffice him. Verily, Allaah will accomplish his purpose. Indeed Allaah has set a measure for all things”
[al-Talaaq 65:2-3 – interpretation of the meaning] 
“and whosoever fears Allaah and keeps his duty to Him, He will make his matter easy for him”
[al-Talaaq 65:4 – interpretation of the meaning]
Whoever gives up something for the sake of Allaah, Allaah will compensate him with something better than it. 
And Allaah knows best.