cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
trevormolag Frequent Visitor
Frequent Visitor

Troubleshooting Oauth with custom Dataconnector: "Credentials are required"

Hello,

 

I work for a SaaS company that would like to publish a Power BI content pack for our application, that could be used on the web or Power BI desktop.

 

To get started, I am following the process described here. Since our application requires OAuth sign on, I am creating a custom Dataconnector by following the process described here, with more documentation here.

 

I successfully created a connector in an afternoon following the Github example. I am able to succesfully complete the Oauth flow and sign in to our service after publishing the custom Dataconnector to "Get Data" in Power BI Desktop:

 

 

However, I cannot seem to make an actual connection to an API endpoint to pull data from our app. Once I get to the message above, I do not begin pulling data as expected. I tried closing the above box, hitting "Get Data" again, and re-selecting our custom Dataconnector. This is the message I then get:

 

 

Credentials are definitely stored in Power BI, as verified by going to Edit Queries > Data source settings.

 

My assumption is that something is going wrong on the final request to the API; perhaps Power BI is not relaying the access_token acquired by the TokenMethod in my Dataconnector in accordance with our API's documentation. Or maybe the credentials aren't being stored properly.

 

My questions are as follows:

  1. Under what circumstances does Power BI display the "Credentials are required" error? (A 401? 403? etc)
  2. How does Power BI transmit an Oauth access_token to a Dataconnector API once it has been stored?
  3. Is there a way I can inspect the request, including headers being sent by Power BI to my API?
  4. (Long shot) is there a way to inspect any of the stored credential information?
  5. Is there anything else I should try?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
trevormolag Frequent Visitor
Frequent Visitor

Re: Troubleshooting Oauth with custom Dataconnector: "Credentials are required"

Solved it on my own today. My issue was that something that worked in the example, was not working for my use case.

 

In case anyone is wondering how to display the stored credential information for a data connector in Power BI via Power Query, you can use:

 

    let       
        creds = Extension.CurrentCredential(),
        table = Record.ToTable(creds)
    in
        table;

  

1 REPLY 1
Highlighted
trevormolag Frequent Visitor
Frequent Visitor

Re: Troubleshooting Oauth with custom Dataconnector: "Credentials are required"

Solved it on my own today. My issue was that something that worked in the example, was not working for my use case.

 

In case anyone is wondering how to display the stored credential information for a data connector in Power BI via Power Query, you can use:

 

    let       
        creds = Extension.CurrentCredential(),
        table = Record.ToTable(creds)
    in
        table;