Showing results for 
Search instead for 
Did you mean: 
New Member

OAUTH Custom Connector Works in PowerBI but gets "Invalid connection credentials" Error

Here is what I have done:

- developed a working OAUTH Custom Connector for PowerBI.

- added it to my data gateway.

- added "TestConnection" to my connector to make it compatable with the gateway.

- tried to configure the gateway with my custom connector


I am getting this error:

Unable to connect: We encountered an error while trying to connect to . Details: "We could not register this data source for any gateway instances within this cluster. Please find more details below about specific errors for each gateway instance."Hide details
Activity ID:	de69c3a6-xxxx-4fef-ad29-f465ffcad197
Request ID:	eb287652-xxxx-418e-cba9-dee9f2065aab
Cluster URI:
Status code:	400
Error Code:	DMTS_PublishDatasourceToClusterErrorCode
Time:	Thu Jul 04 2019 11:57:56 GMT-0700 (Pacific Daylight Time)
Version:	13.0.9933.268
xxxxxxxxxxxxxx:	Invalid connection credentials.
Underlying error code:	-2147467259
Underlying error message:	Credentials are required to connect to the xxxxx source. (Source at {"url":"{\"url\":\"https:\\\/\\\/\\\/xxxx\\\/v1\\\/legacy\\\/lists\\\/xxxxx\"}"}.)
DM_ErrorDetailNameCode_UnderlyingHResult:	-2147467259
Microsoft.Data.Mashup.CredentialError.DataSourceKind:	xxxxxxxxxxx
Microsoft.Data.Mashup.CredentialError.DataSourcePath:	{"url":"{\"url\":\"https:\\\/\\\/\\\/xxxxxxx\\\/v1\\\/legacy\\\/lists\\\/xxxxx\"}"}
Microsoft.Data.Mashup.CredentialError.Reason:	CredentialMissing
Microsoft.Data.Mashup.MashupSecurityException.DataSources:	[{"kind":"xxxxxxxxx","path":"{\"url\":\"{\\\"url\\\":\\\"https:\\\\\\/\\\\\\/\\\\\\/xxxxxxx\\\\\\/v1\\\\\\/legacy\\\\\\/lists\\\\\\/xxxxx\\\"}\"}"}]
Microsoft.Data.Mashup.MashupSecurityException.Reason:	CredentialMissing

CredentialMissing seems like a pretty specific error except that the credential shouldn't be missing.  Also, the URL seems to be using more escape slashes than it should need.  My .Contents function accepts a text parameter which is the only thing I can think that might be causing this but I haven't been able to fix it so far with several different type conversion attempts.


Any ideas?


Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!


Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors