The secondary control is applied in islanded Microgrids (MGs), after the primary control, in order to restore the buses voltage and frequency to specified values. The existing power flow methods can accurately calculate the power flow for droop-controlled islanded MGs, but in many cases, they cannot calculate the steady-state solution of the MG after the action of secondary controllers. The main challenge in the steady-state modelling of the secondary layer lies in that the secondary controllers consist of integral parts, which can integrate functions with different integral histories, and therefore, under certain circumstances, can imply inaccurate power sharing between the distributed generation units (DGs). This phenomenon is most pronounced under communication failures, as will be shown in the simulations. In this way, this paper proposes a power flow method for calculating, accurately, the steady-state solution of hierarchically controlled islanded AC MGs, including droop-based primary control and secondary control. The paper includes four main features: a) generalized implementation in several communication strategies e.g., centralized, decentralized, consensus, distributed averaging, b) precise simulation of communication links and integral parts of secondary controllers, c) low computation time, and d) accurate 4-wire network representation. Simulations were executed to validate the proposed method against Simulink and to highlight the importance of an accurate modelling of secondary control in the power flow method for islanded MGs