I’ve found the solution.
When creating the credentials (Control Panel>User Accounts>Credential Manager>Windows Credential) I had created the credentials in ‘Windows credential’ instead of ‘Generic credentials’.
I’ve removed the credentials from ‘Windows credential’ and added them again in ‘Generic credentials’ and everything works correctly.
Thanks to the community! I hope this helps someone!