Forum Discussion
Get current URL in OData feed
I am brand new for Power Query. I try to write custom connector to my OData feed. It will have to create an authorization token and insert it to the http header. To creteate a token I have to know the current executed url. I have a base url eg. https://MySite/Admin/OData which returns list of all entities e.g. Products, Promotions. ETC. It work as expected in PowerBi. It allows user to slected the entities. After that data is loadaed from urls like: https://MySite/Admin/OData/Products, https://MySite/Admin/OData/Promotions (I have custom routing in my OData feed.) I want to know this particular url executed by PowerBi. This information is needed to create a valid token.
5 Replies
- Greg_DecklerCommunity Champion
Hmm, well ImkeF might be able to assist with this one. Probably will need additional information perhaps.
- ImkeFCommunity Champion
Hi PawelSow
not sure I understand the exact question here, but this article is the best source on how to make sure that dynamic queries will be refreshed in the service: http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/
- PawelSowFrequent Visitor
This unfortunatelly does not help me. In case of OData feed user provide the url to OData source. Power Bi use this url to display a form with list of all available entities types. User can choose which entities should be loaded. In my case e.g Products, Clients, Organisations. After that PowerBi try to load this data by calling relevant urls. During each of this call custom connector is executed. (I am sure about this because I inserted current time to the header.) I want to know the url which is executed or OData entity selected by user,
- v-juanli-msftCommunity Support
Hi PawelSow
Firstly i need to confirm your requirement with you, which is your real goal from the followings:
1. you can connect to the url and this url data source is public,
what you want is to create one kind of authentication to get the data source.
2. you want to know how power bi do in backend when it connects to your url.
Best Regards
Maggie