Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
We are developin a custom data connector to connec to through a custom WEB API to a SaaS application.
The Authentication type is similar to the github example i.e. OAuth2
XXX = [ TestConnection = (dataSourcePath) => { "XXX.Contents" }, Authentication = [ OAuth = [ StartLogin = StartLogin, FinishLogin = FinishLogin, Logout = Logout, Label = Extension.LoadString("AuthenticationLabel") ] ], Label = Extension.LoadString("DataSourceLabel"), SupportsEncryption = true ];
From Power BI Desktop everyting works fine.
These days we are moving to the Pro features where we publish the dataset and or reports that have been developed using data from our XXX connector (ONLY from this source).
We have downloaded and succesfully installed the latest version of the On Premises Gateway (not the personal one).
We have succesfsfully setup the connection, the datasource as shown in the figure below
At the datasource part of the service we have the status as shown in the following screenshot:
And the error we got from both refresh and scheduled refresh is the following:
At the custom connector code level all the calls to the api are using the access_token like in the example below:
WebAPI_GetTopLevelMenu = () => let ebsCommand = "asset", params = Uri.BuildQueryString([routeId = "PBZ.json"]), skey = Extension.CurrentCredential()[access_token], url = Uri.Combine(apiURL, apiCommand) & "?" & params, wb = Web.Contents(url, [Headers = [#"Authorization" = "Bearer " & skey]]), tb = Text.FromBinary(wb), js = Json.Document(tb) in js;
Like I said, when running fvrom Power BI Desktop everything works fine (OAUTH sign in, execution of api cals leading to fetching data, etc.
Can someone please give me a direction on how to "debug" the error ?
Is it due to the gateway? due to the connector?
Regards,
Stavros
One more clue:
I changed the custom data connector code
XXX = [ TestConnection = (dataSourcePath) => { "XXX.Contents" }, Authentication = [ OAuth = [ StartLogin = StartLogin, FinishLogin = FinishLogin, Logout = Logout, Label = Extension.LoadString("AuthenticationLabel") ] ], Label = Extension.LoadString("DataSourceLabel"), SupportsEncryption = false ];
To NOT Support encryption and the refresh works fine. So the question is what should a custom data connector developer do in order for his/her code to work with encrypted connections?
I though that the encryption / decryption will be handled by the service / gateway and that the custom data connector should not be ware of the calling context.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
25 | |
3 | |
2 | |
2 | |
2 |