A method for forming a common electrode with a plurality of optoelectronic devices each comprising a front face and a rear face connected by a flank, the method comprising the steps of: a) providing a support substrate on a face of which, named main face, rest, by a rear face thereof, the plurality of optoelectronic devices separated by trenches, said trenches being delimited by the flanks of said optoelectronic devices and a bottom at the main face; b) forming a dielectric layer by covering the front faces, the flanks, and the bottom of the trenches, the dielectric layer having a thickness E1 and a thickness E2, which is less than the thickness E1, at, respectively, the front faces and the flanks; c) wet etching a thickness E3 of the dielectric layer, the thickness E3 being less than the thickness E1, so as to uncover the flanks at a first section of the trenches and keep at least partially the dielectric layer on the front faces; d) forming a metal layer, by covering the trenches and the front faces; the metal layer filling advantageously the trenches; e) performing a chemical-mechanical polishing of the metal layer, said polishing stopping on a portion of the dielectric layer kept by the covering the front faces at the end of step c), the metal remaining in the trenches forming the common electrode, each trench comprises, from the bottom and adjacent to the first section, a second section, the first section and the second section extending, respectively, according to a first height and a second height, the first section leading to a plane formed by the front faces of the optoelectronic devices, step b) is preceded by a step b0) of forming, by a conformal deposition technique, a passivation layer by covering the front faces, the flanks, and the bottom of the trenches, the step c) also allowing for removal of the passivation layer at the first section. a) providing a support substrate on a face of which, named main face, rest, by a rear face thereof, the plurality of optoelectronic devices separated by trenches, said trenches being delimited by the flanks of said optoelectronic devices and a bottom at the main face; b) forming a dielectric layer by covering the front faces, the flanks, and the bottom of the trenches, the dielectric layer having a thickness E1 and a thickness E2, which is less than the thickness E1, at, respectively, the front faces and the flanks; c) wet etching a thickness E3 of the dielectric layer, the thickness E3 being less than the thickness E1, so as to uncover the flanks at a first section of the trenches and keep at least partially the dielectric layer on the front faces; d) forming a metal layer, by covering the trenches and the front faces; the metal layer filling advantageously the trenches; e) performing a chemical-mechanical polishing of the metal layer, said polishing stopping on a portion of the dielectric layer kept by the covering the front faces at the end of step c), the metal remaining in the trenches forming the common electrode, each trench comprises, from the bottom and adjacent to the first section, a second section, the first section and the second section extending, respectively, according to a first height and a second height, the first section leading to a plane formed by the front faces of the optoelectronic devices, step b) is preceded by a step b0) of forming, by a conformal deposition technique, a passivation layer by covering the front faces, the flanks, and the bottom of the trenches, the step c) also allowing for removal of the passivation layer at the first section. each trench comprises, from the bottom and adjacent to the first section, a second section, the first section and the second section extending, respectively, according to a first height and a second height, the first section leading to a plane formed by the front faces of the optoelectronic devices, step b) is preceded by a step b0) of forming, by a conformal deposition technique, a passivation layer by covering the front faces, the flanks, and the bottom of the trenches, the step c) also allowing for removal of the passivation layer at the first section.