Forum Discussion

haiyangl104's avatar
haiyangl104
Frequent Visitor
5 years ago
Solved

Https 401 Unauthorized Post Request for Refreshing Power BI datasets using REST API via Python

I experience the following error when trying to refresh my Power BI dataset in a particular workspace via Python:

 

 

I've followed this guide online and registered Power BI as "Native App" in Azure Active Directory>App Registrations:

Automate Your Power BI Dataset Refresh with Python - Pivotal BI

 

Under "Azure Active Directory>App Registrations", our Azure Admin provisioned the following API permissions from the guide:

 

 

In Power BI Web Services, I've configured the Data Source credentials correctly:

 

 

Despite following all the steps exactly from the guide, refreshing the dataset via Power BI API post request does not work. Strangely, manually clicking refresh button on Power BI desktop and Power BI web services do work.

 

Any help is appreciated!

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi haiyangl104,

    >>After digging deeper, I found out that my Power BI Pro licensed account is on the Gov Cloud, with address of

    It sounds like you are working with GOV cloud.

    Currently, we do not have permission to test with these types of resources. I'd like to suggest you open a support ticket to power bi team for further supports.

    submit a support ticket

    Support | Microsoft Power BI

    Regards,
    Xiaoxin Sheng

11 Replies