The optoelectronic properties of MSM diodes that are based on an AlGaN/GaN HEMT layer system are investigated as function of the applied bias. For low voltages, the two-dimensional electron gas acts as a barrier for the depletion layer. Therefore, only the upper AlGaN barrier layer contributes to the photocurrent. In the high voltage regime the depletion region penetrates the GaN buffer that adds the spectral responsivity of GaN to the pure AlGaN behaviour in the low voltage regime. The ratio of the responsivities at 350 nm and 300 nm wavelength can be switched from 0.01 at 2.5 V to 0.8 at 4 V bias. This property makes the MSM-2DEG a candidate for use as two-color photodetector. Device fabrication uses standard HEMT processing steps, allowing integration in HEMT circuits without the need of sophisticated growth or etching techniques. 1 Introduction In the last years, GaN based transistors have shown their potential for high power and temperature applications. However, layer growth and device fabrication technology are not yet mature to integrate devices with different layer systems on the same substrate. Therefore, the monolithic integration of components with different functionalities is limited to devices using the same layer structure. In this work we investigate a metal-semiconductor-metal diode that is based on a HEMT layer structure (MSM-2DEG, Fig. 1). Fabrication of the MSM-2DEG diode consists of standard HEMT fabrication steps (mesa etching, Schottky electrode and contact pad fabrication), allowing easy integration in HEMT circuits. The MSM-2DEG device has been analyzed extensively for use as varactor diode and as photodetector [1][2][3][4]. In this work we investigate the bias dependence of the spectral responsivity of the AlGaN/GaN MSM-2DEG photodetector.