A Research Study to Compare Two Types of Insulin, a New Insulin, Insulin Icodec and an Available Insulin, Insulin Glargine, in People With Type 2 Diabetes Who Have Not Used Insulin Before

This study compares insulin icodec (a new insulin taken once a week) to insulin glargine (an insulin taken once daily which is already available on the market) in people with type 2 diabetes.

The study will look at how well insulin icodec taken weekly controls blood sugar compared to insulin glargine taken daily. Participants will either get insulin icodec that participants will have to inject once a week on the same day of the week or insulin glargine that participants will have to inject once a day at the same time every day. Which treatment participants get is decided by chance.

The insulin is injected with a needle in a skin fold in the thigh, upper arm or stomach. The study will last for about 1 ½ years. Participants will have 37 clinic visits and 26 phone calls with the study doctor. At 11 clinic visits participant will have blood samples taken. At 8 clinic visits participants cannot eat or drink (except for water) for 8 hours before the visit.

Participants will be asked to wear a sensor that measures the blood sugar all the time in 5 periods of about one month during the study (about 5 months in total). Women cannot take part if pregnant, breast-feeding or plan to become pregnant during the study period.


Eligibility Criteria:
Inclusion Criteria:

* Male or female aged above or equal to 18 years at the time of signing informed consent.
* Diagnosed with type 2 diabetes mellitus (T2D) 180 days or more prior to the day of screening.
* HbA1c from 7.0-11.0% (53.0-96.7 mmol/mol) both inclusive at screening confirmed by central laboratory analysis.
* Insulin naïve. However, short term insulin treatment for a maximum of 14 days prior to the day of screening is allowed, as is prior insulin treatment for gestational diabetes.
* Stable daily dose(s) 90 days or more prior to the day of screening of any of the following anti-diabetic drug(s) or combination regimen(s): a. Any metformin formulations at least or greater than 1500 mg or maximum tolerated or effective dose. b. Any metformin combination formulations equal to or above 1500 mg or maximum tolerated or effective dose. c. Any of the following oral anti-diabetic drug classes including combinations ((equal to or above half of the maximum approved dose according to local label or maximum tolerated or effective dose): Sulfonylureas, Meglitinides (glinides), dipeptidyl peptidase-4 (DPP-4) inhibitors, Sodium-glucose co-transporter-2 (SGLT2) inhibitors, Thiazolidinediones, Alpha-glucosidase inhibitors, Oral combination products (for the allowed individual oral anti-diabetic drugs), Oral or injectable glucagon-like peptide 1 (GLP-1) receptor agonists
* Body mass index (BMI) equal to or below 40.0 kg/m\^2.

Exclusion Criteria:

* Any episodes (as declared by the subject or in the medical records) of diabetic ketoacidosis within 90 days prior to the day of screening.
* Myocardial infarction, stroke, hospitalisation for unstable angina pectoris or transient ischaemic attack within 180 days prior to the day of screening.
* Chronic heart failure classified as being in New York Heart Association Class IV at screening.
* Anticipated initiation or change in concomitant medications (for more than 14 consecutive days) known to affect weight or glucose metabolism (e.g. treatment with orlistat, thyroid hormones, or corticosteroids).
* Uncontrolled and potentially unstable diabetic retinopathy or maculopathy. Verified by a fundus examination performed within the past 90 days prior to screening or in the period between screening and randomisation. Pharmacological pupil-dilation is a requirement unless using a digital fundus photography camera specified for non-dilated examination