This paper describes how flexibility of medium voltage systems can be used for operation of high voltage systems. This is explained using the example of a congestion management system for high voltage networks developed in the research project IDEAL. First, it is explained to what extent flexibility is required for high voltage system operation. After that, the entire congestion management system with flexibility of medium voltage systems is presented. Then, methodology for observability analysis, state estimation and determination of flexibility potential is shown. Finally, the implementation of the methodology in two real medium voltage systems is described.