Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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()).
When I try to login again, Visual Studio crash.
I'm doing something wrong?
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
Maggie
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!