This means you must do something. You have no other choice. You are forced to do it.
に、。
Due to the project delay, we have no choice but to revise the plan.
、。
Because my father suddenly collapsed, I had no choice but to give up on going to university.
、。
Even if it's a job you don't want to do, there are times you have no choice but to do it in order to make a living.
、に。
Although there were opposing opinions, in the end we had no choice but to agree with the president's proposal.
に、。
Public dissatisfaction is growing over the situation in which they have no choice but to accept the tax increase.