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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pixelatedpic
New Member

New to power bi, need help on authentication via api

Hi,

 

I am new to Power Bi and its REST API. I have tried to authenticate using API from Postman software and from browser too but no luck yet.

What i am trying to do is below.

1- I have created a push dataset in power bi.

2- I want to push data to power bi dataset from php or python script.

 

I am not able to do that and dont know any easy method. I have used REST API for many softwares but this one is not so familiar and dificult. So please guid me an easy way that i can test this from postman software and enjoy this great software(Power Bi)

 

Hope to get a reply ASAP.. thanks

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@pixelatedpic wrote:

Hi,

 

I am new to Power Bi and its REST API. I have tried to authenticate using API from Postman software and from browser too but no luck yet.

What i am trying to do is below.

1- I have created a push dataset in power bi.

2- I want to push data to power bi dataset from php or python script.

 

I am not able to do that and dont know any easy method. I have used REST API for many softwares but this one is not so familiar and dificult. So please guid me an easy way that i can test this from postman software and enjoy this great software(Power Bi)

 

Hope to get a reply ASAP.. thanks


@pixelatedpic

To authenticate via REST API, the first step is to Register an app with Azure AD. Then you can make a POST call as

POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

client_id={registered native client app id}&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username={your power bi account}&password={your password}

The response JSON contains the access token

Capture.PNG 

View solution in original post

1 REPLY 1
Eric_Zhang
Employee
Employee


@pixelatedpic wrote:

Hi,

 

I am new to Power Bi and its REST API. I have tried to authenticate using API from Postman software and from browser too but no luck yet.

What i am trying to do is below.

1- I have created a push dataset in power bi.

2- I want to push data to power bi dataset from php or python script.

 

I am not able to do that and dont know any easy method. I have used REST API for many softwares but this one is not so familiar and dificult. So please guid me an easy way that i can test this from postman software and enjoy this great software(Power Bi)

 

Hope to get a reply ASAP.. thanks


@pixelatedpic

To authenticate via REST API, the first step is to Register an app with Azure AD. Then you can make a POST call as

POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

client_id={registered native client app id}&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username={your power bi account}&password={your password}

The response JSON contains the access token

Capture.PNG 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.