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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Not applicable

Power Query SDK is crashing after try to login again for OAuth v2 in Unit testing

Hello, I'm trying to run the unit tests, a have a couple of functions are calling to an API that require authentication.

The first time is OK, I authenticate (MyConnector.Contents() ). but then the Error message tab comes up again to request the authentication for another endpoint (MyConnector.AnotherFunction()).

Screen Shot 2020-08-11 at 1.03.39 PM.png

 When I try to login again, Visual Studio crash.


Screen Shot 2020-08-11 at 1.08.06 PM.png


I'm doing something wrong? 



Community Support
Community Support

Hi @Anonymous 

From the screenshot, it seems your custom connector doesn't define the proper authentication type, please follow a clear guide how to implement Oauth2 authentication type for custom connector:


Best Regards


Not applicable

Thank you @v-juanli-msft 


I already have my connector working with oauth authentication, but the problem is when I'm running the unit testing in the *.query.pq file. 

I'm trying to consume an OAuth2 API, however, at a certain stage a Pop-Up opens asking for Login and Password on the page. Is it possible to login with Power Query?

From the screenshot it appears your data source kind is showing up as "Web", rather than your custom connector. This likely means that you're trying to call Web.Contents outside of your custom data source function. 

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors