Unable to Create Connection in Power Automate Using On-Prem Gateway - Invalid SQL Credentials Error

Alma Chang 0 Reputation points
2025-08-11T02:24:42.01+00:00

Hi Microsoft Support Team,

I am encountering an issue of SQL connection in Power Automate. I created a connection to on-prem SQL server using on-prem gateway. Upon creation, it has no issue, it is saved successfully. However, when I ran the workflow, the error message popped up saying "Credentials are missing or not valid. inner exception: The credentials provided for the SQL source are invalid".

The other odd thing is that the connection worked for some SQL operations but not others, which doesn't seem to make sense to me as they are using the same connection.

This Get rows action with same connection worked

User's image

This Execute Stored Procedure worked on the first run in foreach item

User's image

However, it failed on the 2, 4, 6, 8, 10, 11 round in the foreach action with same connection

User's image

Moreover, I also noticed that when I tried to edit the connection and re-authenticate it, I failed to authenticate the connection due to the same issue, "Credentials are missing or not valid. inner exception: The credentials provided for the SQL source are invalid" when I can connect sql server in SSMS using the same credential.

Would appreciate your help and guidance and please let me know if you need more information from me, many thanks!

Regards,

Alma

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Dakota Williams 0 Reputation points
    2025-08-12T03:45:07+00:00

    Hey! If you're getting an "Invalid SQL Credentials" error when setting up a connection in Power Automate via On-Prem Gateway, double-check that your SQL username and password are correct and that the account has access to the target database. Also, make sure you’re using Windows or SQL authentication—not mixed improperly. Keeping your environment up to date with a genuine version of Windows or SQL Server from the official Microsoft store or Microsoftprokey can help avoid these issues.

    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.