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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Power BI REST API - UserNotLicensed

Hi!

I'm trying to refresh dataset using REST API (using this example: https://github.com/Azure-Samples/powerbi-powershell/blob/master/manageRefresh.ps1) 

Howere I've got an error:
$uri = "https://api.powerbi.com/v1.0/$groupsPath/datasets/$datasetID/refreshes"
Invoke-RestMethod -Uri $uri -Headers $authHeader -Method POST -Verbose

 

Invoke-RestMethod : {"error":{"code":"UserNotLicensed","message":"User is not licensed for Power BI"}}

 

The user used for operation has trial Pro license. Is it limitations of Trial ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-jiascu-msft

actually i've solved this problem. Had to use Python to use REST API, powershell example don't work for me.

 

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

There isn't such a limitation to Pro Trail account. I would suggest you check these things below.

1. Use exactly the same user who can log in Power BI. 

2. Register your app in the same tenant with Power BI, which couldn't be like this: onmicrosoft.com and yourdomain.com.

3. Did you grant the permission in the Azure? You need to click the "Grant Permission" button explicitly.

4. The user should have the Edit permission of the App workspace.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-jiascu-msft

actually i've solved this problem. Had to use Python to use REST API, powershell example don't work for me.

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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