XBP1 expression in pancreatic islet cells is associated with poor glycaemic control especially in young non-obese onset diabetes across ancestries. Here, XBP1 is linked to diabetes mellitus.