Forum Discussion

PawelSow's avatar
PawelSow
Frequent Visitor
6 years ago

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_Deckler's avatar
    Greg_Deckler
    Community Champion

    Hmm, well ImkeF might be able to assist with this one. Probably will need additional information perhaps.

      • PawelSow's avatar
        PawelSow
        Frequent 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-msft's avatar
    v-juanli-msft
    Community 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