Forum Discussion
Custom connector data sources unavailable
I've created a custom connector that consumes two oData data sources. The first oData feed is passed an access key and returns an authentication token, which is then passed to the second service that returns the actual queriable data. The result set looks great inside of the PBI desktop. However, when I save my report to my Power BI report server I am unable to configure my data source connection (it is disabled) and therefore unable to to set up a scheduled refresh. When I choose the out of the box oData feed, and select my first oData feed as a source, these two configurable items are available for me to use. Is there something that I am missing in my custom connector that is not allowing these features to be available to me.? I am a newbie to m query and I am using the TripPin samples as a guide to my learning. Wondering if there is something that I haven't defined in my connector that I need to? I am using Key for my Authentication method. My solution is being designed to run against on-premise data sources. My code is approximate to this:
accessServiceUrl = "https://xxxx/portalaccess.svc/GetAccessToken?id="
[DataSource.Kind="SourceData", Publish="SourceData.Publish"]
shared SourceData.Feed = () =>
let
credentialToken = Extension.CurrentCredential()[Key],
serviceUrl = Text.Combine({accessServiceUri, credentialToken}),
source = OData.Feed(serviceUrl),
sourceDataSvc = Lines.ToText(source[serviceUrl]),
accessToken = Lines.ToText(source[token]),
authToken = Text.Combine({"Bearer ",accessToken}),
dataResults = OData.Feed(sourceDataSvc, null, [Headers = [Authorization = authToken]]),
in
dataResults;
1 Reply
- v-juanli-msftCommunity Support