The complexity of microgrid (MG) control has been a point of contention when implementing an appropriate controller due to factors such as grid distortion, external disturbances, uncertainties, and the inaccessibility of these applications to an exact model. To address this, designers must either reduce the sensitivity and accuracy of control objectives to an acceptable level, which is not always possible, or use more computationally complex controllers. The proportional-integral (PI) controller is the most popular in practice due to its simple and straightforward structure. Numerous algorithms have been presented to well-tune the parameters of this type of controller. The primary difficulty in determining the PI controller coefficients is extracting an accurate model of the studied system. As a result, recent consideration has been given to control methods based on system input/output data measurements. This paper proposes a data-driven method for tuning PI controller coefficients referred to as iterative feedback tuning (IFT) to control the inverter-side current of a three-phase grid-connected voltage source inverter (VSI) under grid distortion and various grid frequency conditions. Simulation results are provided to validate the proposed method.