Divorcing a prisoner

Nc for this as obviously v personal. I have a close relative trying to divorce their spouse who is in prison for a violent offence against them. Spouse has pleaded guilty. Solicitor managing the divorce says they cannot proceed as relative does no have prisoner number of spouse. We have no idea how to get prisoner number as they seem to be kept confidential and without it relative is trapped. Does anyone have any ideas?

Thank you. I had realised that there was no way we could get the number without the spouse's permission but I didn't know that a solicitor could get it. They have taken her money upfront and now say they can't proceed.