According to the mandate of heaven when can people overthrow the emperor?

According to the mandate of heaven people can overthrow the emperor when he loses his army due to the lack of trust