I am setting up a gateway for an on-premises SQL database. I am worried about the security implications of storing the database credentials in the Power BI service. What are the best practices for handling this securely while allowing automatic refreshes?
Power BI gateway credential storage is secure when the service account is restricted to the principle of least privilege and configured with read-only database permissions.
3 answers
I remember back at a healthcare firm when we were debating this exact topic during a SOC2 audit.
We ultimately decided that the risk of storing the connection string was negligible compared to the alternative of manual intervention, which always introduced human error. If you follow the principle of least privilege, that local account used by the gateway should only have read access to the specific schemas required for your dashboards.
Storing credentials in the Power BI gateway is technically secure if your environment is configured correctly, though the primary risk remains the potential for lateral movement if those credentials are over-privileged.
By using the gateway as a bridge, you are essentially offloading the authentication handshake to a localized service, which ensures that the Power BI cloud service itself does not need to handle your raw database handshake directly.
To ensure your gateway implementation maintains architectural integrity, you must prioritize identity isolation and encryption protocols.
- Create a dedicated service account specifically for the gateway that cannot perform write operations.
- Implement Kerberos constrained delegation if your environment supports Windows authentication for seamless SSO.
- Rotate the service account password on a fixed interval according to your organizational security policy.
- Verify that your gateway is installed on a hardened server with limited administrative access.

