Followed the description mentioned in below link:
https://docs.microsoft.com/en-us/sql/tools/bcp-utility?view=sql-server-ver15#G
Goal - Using BCP utility, trying to login to SQL server using Azure Active Directory Username and Password.
Used below command :
bcp tableName out "C:\temp\tabledata.txt" -c -t -S xxxxxxx.database.windows.net -d AzureDB -G -U [email protected] -P xxxxx
Getting below error:
SQLState = FA004, NativeError = 0 Error = [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Failed to authenticate the user '[email protected]' in Active Directory (Authentication option is 'ActiveDirectoryPassword'). Error code 0x800401F0; state 10 CoInitialize has not been called.
Any help ?


