Guest Jose_Manuel_Jurado Posted January 14, 2023 Posted January 14, 2023 We got an issue that our customer is migrating a WIN32 C++ application from on-prem to Azure. When connecting to Azure they got the following error message: [Microsoft][ODBC Driver 18 for SQL Server]Error requesting access token, HTTP status 400, expected 200. SQL State was: CE275; Native Error code was: 0.[/b] Other additional information about the error are: [Microsoft][ODBC Driver 18 for SQL Server][sql Server][b]Failed to authenticate the user '' in Active Directory (Authentication option is 'ActiveDirectoryMSI').[/b] [Microsoft][ODBC Driver 18 for SQL Server][b]TCP Provider: Timeout error [258]. (258[/b]) [Microsoft][ODBC Driver 18 for SQL Server]Unable to complete login process due to delay in login response (258) [Microsoft][ODBC Driver 18 for SQL Server][b]Login timeout expired (0[/b]) Our customer is changing the connection using of their application using ODBC (API) from Windows Integrated authentication to Azure Active Directory in Azure SQL with User Managed Identity and they found this error message calling SQLConnect function: dwResult = SQLConnect(hDefaultDBC, (SQLCHAR*)szDataSourceName, (SQLSMALLINT)strlen(szDataSourceName), (SQLCHAR*)szUserName, (SQLSMALLINT)strlen(szUserName),(SQLCHAR*)szPassword, (SQLSMALLINT)strlen(szPassword)); In this situation happened when szUserName is empty and we assume the will take this information from LoginID specified in the ODBC DSN. At this point we found out that giving the value of szUserName the UID/object principal id, the issue was resolved. Enjoy! Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.