Hi @Mayra Arango ,
It may be more about not having enough permissions
Please make sure the user you used is added as database server user, this user can connect by SSMS directly, please change the run as user account to a domain account that as access to the SQL Server database, and you can try to change the data connection so that it uses SQL authentication and embedded password, if the Run As user is a local machine account and it does not have access to the SQL Server database
Please check out this doc:
https://kb.tableau.com/articles/issue/sql-extract-refresh-fails-with-login-failed-for-user
-------------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.