Forum Discussion
Can't get API token from Azure machines...
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
- JECp2 years agoRegular Visitor
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.