A Research Study in People With Type 2 Diabetes to Compare Two Types of Insulin: Insulin 287 and Insulin Glargine

This study compares insulin 287 (a possible new medicine) to insulin glargine (a medicine doctors can already prescribe) in people with type 2 diabetes. Different ways of switching from the insulin which the participants are already on to insulin 287 are also compared. This is done to find the best way to switch to insulin 287. The participants will either get insulin 287 that they will have to inject once a week or insulin glargine that they will have to inject once a day. Which treatment any participant gets is decided by chance. The study will last for about 5 months (23 weeks). The participants will have 14 clinic visits and 6 phone calls with the study doctor. At 3 of the clinic visits participants will be asked not to eat or drink anything (except for water) in the last 8 hours before the visit. During the study, the doctor will ask the participants to: 1) measure their blood sugar every day with a blood sugar meter using a finger prick; 2) write down different information in a diary daily and return this to their study doctor. 3) wear a medical device (sensor) that measures the participants blood sugar all the time for 18 weeks (about 4 months) during the study.


Eligibility Criteria:
Inclusion criteria:

* Male or female, aged 18-75 years (both inclusive) at the time of signing informed consent.
* Diagnosed with type 2 diabetes mellitus greater than or equal to 180 days prior to the day of screening.
* Glycosylated haemoglobin (HbA1c) of 7.0-10.0% (53.0-85.8 mmol/mol) (both inclusive) as assessed by central laboratory.
* Treated with once daily or twice daily basal insulin analogue (insulin degludec, insulin detemir, insulin glargine U100 or U300, total daily dose of 10-50 U, both inclusive) greater than or equal to 90 days prior to the day of screening.
* Stable daily dose(s) for 90 days prior to the day of screening of any of the following antidiabetic drug(s) or combination regime(s):

  1. Any metformin formulations greater than or equal to 1500 mg or maximum tolerated or effective dose (as documented in subject's medical records).
  2. Free or fixed combination therapy: Metformin as outlined above with or without dipeptidyl peptidase 4 inhibitors (DPP4i) with or without sodium-glucose cotransporter 2 inhibitors (SGLT2i) is allowed: 1) DPP4i (greater than or equal to half of the maximum approved dose according to local label or maximum tolerated or effective dose); 2) SGLT2i (greater than or equal to half of the maximum approved dose according to local label or maximum tolerated or effective dose.
* Body mass index (BMI) less than or equal to 40.0 kg/m\^2.

Exclusion criteria:

* Known or suspected hypersensitivity to trial product(s) or related products.
* Female who is pregnant, breast-feeding or intends to become pregnant or is of child-bearing potential and not using an adequate contraceptive method.
* Participation in any clinical trial of an approved or non-approved investigational medicinal product within 90 days before screening.
* Any disorder, except for conditions associated with type 2 diabetes mellitus, which in the investigator's opinion might jeopardise subject's safety or compliance with the protocol.
* Any episodes of diabetic ketoacidosis within the past 90 days prior to the day of screening and between screening and randomisation.
* Known hypoglycaemic unawareness as indicated by the Investigator according to Clarke's questionnaire question 8.
* Recurrent severe hypoglycaemic episodes within the last year as judged by the Investigator.
* Myocardial infarction, stroke, hospitalisation for unstable angina pectoris or transient ischaemic attack within 180 days prior to the day of screening and between screening and randomisation.