By default, the gateway runs under the NT SERVICE\PBIEgwService Windows service account. However, as shown in the following image from the On-premises data gateway desktop application, this account can be changed via the Service Settings tab:
In the preceding example, a user has opened the gateway application from the server on which a gateway instance has been installed. Additionally, in order to change the service account, the user has signed into Power BI from the gateway application with the email address used to log in to the Power BI service.
If the default account (