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

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!