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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a program that uses the Power BI API and has been running just fine for years. We recently moved some machines from on-prem to Azure VMs and suddenly this program no longer works. The error occurs when I run:
Using tsk As Tasks.Task(Of AuthenticationResult) = ctxt.AcquireTokenAsync("https://analysis.windows.net/powerbi/api", sClientID, cred)
tsk.Wait()
End Using
The StackTrace is:
Unfortunately, the error message is an incredibly helpful "One or more errors occurred".
At first, we thought it was a firewall issue, but we can access sites using https, so we know Port 443 is open and working, and the documentation says that the Power BI API only uses 443.
Does anyone have any ideas on what could possibly cause this?
Hi @JECp ,
It sounds like there may be an issue with the authentication process when trying to acquire the API token. The possible solution could be to check if the Azure VMs have the sufficient permissions to access the Power BI API. You may also want to check if the client ID and credentials being used are still valid and have not expired or been revoked.
How to generate Access Token for Azure with grant type password? PowerBI REST API - Stack Overflow
Azure Permissions 101: How to manage Azure access effectively
Best Regards
We looked into firewall and DNS issues, but everything was clear on that front. I was able to get more info about the error though, and it shows this:
I don't understand why I'm getting this, as this is the same App Reg, same user being used for authentication, same network. It's just that the machines I run this from (when it fails) are all Azure VMs. Any on-prem machine works just fine.
Is it seeing Azure VMs as being at a different "location"? If so, how do I address this? I need this code to run from both locations.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |