Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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;

  

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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;

  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors