High severityauthentication
Power BI Refresh Error:
18456
What does this error mean?
Authentication failed — the provided credentials are invalid, the account is disabled, or the login has no access to the target database.
Common causes
- 1Wrong username or password in the connection string (state 8)
- 2The SQL login does not exist on the server (state 5)
- 3The login exists but has no access to the specified database (state 16)
How to fix it
- 1Step 1: Find the exact state code in the SQL Server error log: SSMS → Management → SQL Server Logs, or run: EXEC xp_readerrorlog 0, 1, N'18456'. State 5 = invalid login, state 8 = wrong password, state 16 = no DB access.
- 2Step 2: Reset the password or re-enable the account: ALTER LOGIN [loginname] WITH PASSWORD = 'NewPass123!'; ALTER LOGIN [loginname] ENABLE;
- 3Step 3: If SQL auth is rejected entirely, verify the server auth mode: SSMS → right-click server → Properties → Security → set 'SQL Server and Windows Authentication mode', then restart SQL Server service.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error