cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Connection Credentials - Login failed for user

Hi everyone,

I'm facing some problems when I try to add a data source from SQL server. This is what I get :

 

Activity ID:9854c13b-2074-4b78-b0a1-4467bb634505
Request ID:85ee802b-6523-ba63-2a13-2a2b1f63c6ce
Cluster URI:https://wabi-france-central-a-primary-redirect.analysis.windows.net/
Status code:400
Error Code:DMTS_PublishDatasourceToClusterErrorCode
Time:Mon Dec 06 2021 11:50:32 GMT+0100 (heure normale d’Europe centrale)
Service version:13.0.17186.43
Client version:2111.3.08807-train
my_gateway:Invalid connection credentials.
Underlying error code:-2146232060
Underlying error message:Login failed for user 'my_adress@adress.com'.
DM_ErrorDetailNameCode_UnderlyingHResult:-2146232060
DM_ErrorDetailNameCode_UnderlyingNativeErrorCode:18456

 

The adress I used to add the data source is the one I use to connect to SQL server.  But, I use a different one to connect to PowerBi. I'ts maybe the problem, but I'm not sure.


Also, I used the basic authentification method to do it.

 

I tried the the windows authentification method, but I also got an error which is : "The on-premises data gateway's service account failed to impersonate the user."


Have you any ideas to solve this problem ?

 

Thanks.

Status: Investigating

See this from the docuement:

If there isn't a Delegation tab on the Properties dialog box, you can manually create an SPN on the account to enable it. Use the setspn tool that comes with Windows (you need domain admin rights to create the SPN).

 

So if you are not the domain admin, perhaps you have no access to create the SPN.

 

Best Regards,
Community Support Team _ Yingjie Li

Comments
v-yingjl
Community Support
Status changed to: Investigating

You can follow this document to add SQL Server data source to the gateway first: Manage your data source - SQL Server 

 

Based on the error message, please verify that you have the correct username and password. Also, verify that those credentials can successfully connect to the data source. Make sure the account that's being used matches the authentication method. See: Error: Unable to Connect. Details: "Invalid connection credentials" 

 

In addition, you have mentioned that 'The on-premises data gateway's service account failed to impersonate the user' when using Windows authentication. Have you configured Kerberos for it? See: Kerberos 

 

Best Regards,
Community Support Team _ Yingjie Li

 

 

TheracPowBi
Frequent Visitor

Hello,

thanks for your answer.

 

I realised that the authentification method I had to use was the windows one, so I tried to configure Kerberos.

I have another problem when I try to create a SPN on my account.

When I use the "setspn -S gateway/MyGatewayMachine myserviceaccount\GatewaySvc" command, I receive an error saying me that I don't have the rights to do that. I tried to modify the rights of my account but I still get the error.

Do you know how to get the SPN ?

 

Thanks for your answer.

v-yingjl
Community Support
Status changed to: Investigating

You can refer this document about Kerberos-based SSO:

Configure Kerberos-based SSO from Power BI service to on-premises data sources 

vyingjl_0-1639042517711.png

 

Best Regards,
Community Support Team _ Yingjie Li

TheracPowBi
Frequent Visitor

Thanks for your answer.

It was indeed the document that I followed to try to configure Kerberos.

But, like I said, I had a problem with the command 

"setspn -S gateway/MyGatewayMachine myserviceaccount\GatewaySvc", when I wanted to install the SPN.

I had an error saying that I didn't have the authorization to do that.

 

Have you a solution for this problem ?

 

Thanks.

v-yingjl
Community Support
Status changed to: Investigating

See this from the docuement:

If there isn't a Delegation tab on the Properties dialog box, you can manually create an SPN on the account to enable it. Use the setspn tool that comes with Windows (you need domain admin rights to create the SPN).

 

So if you are not the domain admin, perhaps you have no access to create the SPN.

 

Best Regards,
Community Support Team _ Yingjie Li