"Microsoft SQL: The target principal name is incorrect. Cannot generate SSPI context

Balasala Hareesh 10 Reputation points
2023-09-14T04:29:41.9266667+00:00

Hi Team,

We are getting the error "The target principal name is incorrect. Cannot generate SSPI context" when we try to connect to Power Bi thru azure SQL Server .User's image

Regards,

Hareesh B

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,853 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Olaf Helper 44,741 Reputation points
    2023-09-14T04:49:08.2733333+00:00

    The error message means, you try to logon with Windows Authentication over Kerberos and that fails, because SPN = "Server Principal Name" isn't correctly registered.

    Ask your IT admin to fix it or use Microsoft® Kerberos Configuration Manager for SQL Server®

    1 person found this answer helpful.
    0 comments No comments

  2. Alberto Morillo 33,951 Reputation points MVP
    2023-09-15T04:14:15.4866667+00:00

    Please make sure firewall rules for the database are configured to "Allow access to Azure services" as you can see on below image, and you would need to set up a firewall rule to allow the public IP address used by Power BI to make a connection. Also make sure you choose Database authentication mode in Power BI Desktop, and enter server admin account and password or a SQL user rather than AD account to connect to the Azure SQL database,

    User's image

    Make sure also you specify not only the Azure SQL server name (yourservername.database.windows.net) and the database name in that server when connecting to Azure SQL from Power BI.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.