Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Issue in connecting to companies github

Hi there,

I was trying to use my companies github (github.companyname.com) in Power BI but it seems only connecting to github.com only.

I tried with both, Github connector in Power BI Desktop & downloading Github Template App in Power BI Service.

 

How to make that possible.

7 Replies

  • Hi Anonymous 

     

    the domain you have listed is a sub-domain of your company, it's not actually on GitHub. So using the GitHub connector in PBI will not work as it is trying to connect to a repository that is located on the GitHub domain e.g. https://github.com/microsoft/

     

    So you either need to use Get data -> Web to connect to your github.companyname.com site or if you have a repository on GitHub, connect to that.

     

    regards

     

    Phil

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply PhilipTreacy ,

       

      I tried the way you mentioned but its not returning the expected data; only showing HTML Code, Displayed text.

      Is there any other way of doing it.

       

      • PhilipTreacy's avatar
        PhilipTreacy
        Icon for Super User rankSuper User

        Hi Anonymous 

         

        What exactly did you try?  Are you providing Authentication?  If so, how?  Did you use a GET or POST request?

         

        Are you trying to connect to a subdomain of your company site or an actual GitHub repository?

         

        Please post your code and the response you are getting.  Without these it's very difficult to help you.

         

        Regards

         

        Phil

  • Hi Anonymous 

     

    You haven't answered the other questions I asked, and providing the query code you are using would be a big help.

     

    If you use Get data -> Web then supply Basic Authentication you will get this error:

     

     

    So what I'm still not clear on is:

     

    What authentication you are using and why.

     

    What the site you are conncting to is. Is it just a website that happens to be named github.xxxx ?  Does it require authentication (presumably it does).  If you are trying to authenticate with it, where are the documents/instructions that explain why/how you need to do this?

     

    What data is the site currently returning?

     

    What are you expecting it to return?

     

    Without answers to these questions I can't really help you.  And please provide your query code.

     

    Regards

     

    Phil

     

  • v-luwang-msft's avatar
    v-luwang-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    The current error is a limitation of the version, the new version currently only supports anonymous login verification, the official website makes a detailed description, you can refer to,you can continue to use the old version of the method as described below.

    The legacy Power Query Web connector automatically creates a Web.Page query that supports authentication. The only limitation occurs if you select Windows authentication in the authentication method dialog box. In this case, the Use my current credentials selection works correctly, but Use alternate credentials won't authenticate.

    The new version of the Web connector (currently available in Power BI Desktop) automatically creates a Web.BrowserContents query. Such queries currently only support anonymous authentication. In other words, the new Web connector can't be used to connect to a source that requires non-anonymous authentication. This limitation applies to the Web.BrowserContents function, regardless of the host environment.

    Currently, Power BI Desktop automatically uses the Web.BrowserContents function. The Web.Page function is still used automatically by Excel and Power Query Online. Power Query Online does support Web.BrowserContents using an on-premises data gateway, but you currently would have to enter such a formula manually. When Web By Example becomes available in Power Query Online in mid-October 2020, this feature will use Web.BrowserContents.

    The Web.Page function requires that you have Internet Explorer 10 installed on your computer. When refreshing a Web.Page query via an on-premises data gateway, the computer containing the gateway must have Internet Explorer 10 installed. If you use only the Web.BrowserContents function, you don't need to have Internet Explorer 10 installed on your computer or the computer containing the on-premises data gateway.

    In cases where you need to use Web.Page instead of Web.BrowserContents because of authentication issues, you can still manually use Web.Page.

    In Power BI Desktop, you can use the older Web.Page function by clearing the New web table inference preview feature:

    1. Under the File tab, select Options and settings > Options.

    2. In the Global section, select Preview features.

    3. Clear the New web table inference preview feature, and then select OK.

    4. Restart Power BI Desktop.

     

    You can also get a copy of a Web.Page query from Excel. To copy the code from Excel:

    1. Select From Web from the Data tab.
    2. Enter the address in the From Web dialog box, and then select OK.
    3. In Navigator, choose the data you want to load, and then select Transform Data.
    4. In the Home tab of Power Query, select Advanced Editor.
    5. In the Advanced Editor, copy the M formula.
    6. In the app that uses Web.BrowserContents, select the Blank Query connector.
    7. If you're copying to Power BI Desktop:
      1. In the Home tab, select Advanced Editor.
      2. Paste the copied Web.Page query in the editor, and then select Done.
    8. If you're copying to Power Query Online:
      1. In the Blank Query, paste the copied Web.Page query in the blank query.
      2. Select an on-premises data gateway to use.
      3. Select Next.

    To learn more details ,refer:

    https://docs.microsoft.com/en-us/power-query/connectors/web/web-troubleshoot 

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-luwang-msft , PhilipTreacy 

       

      Thanks both for the replies. PFA screenshot I am getting while trying to connect, its not taking windows credentials too and showing that it only supports anonymous connection.
      Same thing happening in case of excel as well (as you mentioned).

       

      I wanted to know the details e.g. total repository, total projects within repo etc.