How to Create a SQL Login Credentials for Power BI Data Gateway (SQL Server)

How to Create a SQL Login for Power BI Data Gateway (SQL Server)

How to Create a SQL Login for Power BI Data Gateway (SQL Server)

When you're connecting Power BI Service to an on-premises SQL Server database using the Data Gateway, it's crucial to have a dedicated SQL Login for the gateway. This provides a secure and manageable way for Power BI to access your data without relying on Windows authentication (which can be complex in cloud-to-on-prem scenarios) or using highly privileged accounts.

Let's walk through the process of creating a SQL Login in SQL Server Management Studio (SSMS) specifically for your Power BI Data Gateway.

🔧 Step-by-Step in SSMS (SQL Server Management Studio)

Follow these instructions carefully within SQL Server Management Studio to create the new SQL Login:

  • Open SQL Server Management Studio (SSMS) and connect to your SQL Server instance.
  • In the Object Explorer (usually on the left), expand your server instance.
  • Expand the Security folder.
  • Expand the Logins folder.
  • Right-click on Logins and select New Login....
  • In the "Login - New" dialog box that appears:
    • Under the "General" page:
      • Select SQL Server Authentication. This is important as the Gateway will use a username and password.
      • Enter a Login name. A common practice is to use a descriptive name like pbi_gateway_user or powerbi_reader.
      • Set a strong Password and confirm it.
      • Optional: For development or specific controlled environments, you might uncheck "Enforce password policy" and "Enforce password expiration" if you want to manage the password manually. However, for production, it's generally recommended to keep password policies enforced for stronger security.
    • Go to the User Mapping tab (on the left pane).
      • In the "Users mapped to this login" section, check the box next to the database(s) that your Power BI reports will access.
      • In the "Database role membership for: [your database]" section at the bottom, ensure you assign the appropriate role. For read-only access (which is usually sufficient for Power BI reports), select db_datareader. This role grants permission to read all data from all user tables and views in the database. Avoid giving higher privileges like db_owner unless absolutely necessary and understood.
    • Click OK to create the new SQL Login.

✅ Now you have a SQL Login ready for your Power BI Data Gateway!

Login ID: pbi_gateway_user (or whatever name you chose)
Password: Your chosen password

You will use these credentials when configuring the data source within the Power BI Service's "Manage Gateways" section, ensuring your Power BI reports can securely refresh data from your on-premises SQL Server.

Raushan Ranjan

Microsoft Certified Trainer

.NET | Azure | Power Platform | WPF | Qt/QML Developer

Power BI Developer | Data Analyst

📞 +91 82858 62455
🌐 raushanranjan.azurewebsites.net
🔗 linkedin.com/in/raushanranjan

Comments

Popular posts from this blog

Module 1 - Lesson 1: Getting Started with Power BI

Power BI Advanced learning

Module 1 - Lesson 2: Getting Data from Multiple Sources

Module 1 - Lesson 3: Resolve Data Import Errors in Power BI

Module 2 - Lesson 1: Introduction to Power Query Editor