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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
PBI_Developer2
Regular Visitor

Rest API Informations

Hello community,


I'm new to Rest API of Power BI, I would like to create a python script to get some informations using the Power BI Rest API.

What credentials/infos I need to have in the script (Tenant_ID, etc), and from where I can get them.

Do I need a specific access from the IT team ?

And as a first exercice, with what do you recommend to me start?

 

Thank you.

1 REPLY 1
Zanqueta
Super User
Super User

Hi @PBI_Developer2   , I am not fully certain, but to use the Power BI REST API with Python you first need to understand that it requires authentication through Microsoft Entra ID and then interaction with the Power BI Service.

 

To authenticate, you must register an application in the Azure portal. From this registration you will obtain the required credentials, including the Tenant ID, Client ID and Client Secret. You also need to grant the appropriate API permissions, such as read access to datasets or reports. These permissions often require approval from your IT team, so in most organisations you will need support from them before proceeding.
Once the application is configured, the next step is to generate an OAuth2 access token. This token is used to authenticate all API requests. After obtaining the token, you can call Power BI REST API endpoints from Python using standard libraries such as requests.
As a starting exercise, it is recommended to begin with a simple request, such as listing workspaces. This allows you to validate that authentication and permissions are correctly configured before moving to more advanced scenarios.
 
In summary, you need an application registered in Entra ID, the corresponding credentials and permissions, and a valid access token. With these elements in place, you can begin making REST API calls and gradually expand your use cases.

 

If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors