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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
skumar_allturna
Regular Visitor

Power BI Generate Token API Failure

Hi
We have created a MVC web API with embedded Power BI reports. We have also commissioned a Power BI dedicated capacity on Azure.  The app was being used successfully for the last 4 months - however we now have an API Failing - https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken
The flow of the Power BI API is as follows. 
https://login.microsoftonline.com/common/oauth2/token - Request an access token - POST Successful
https://api.powerbi.com/v1.0/myorg/groups - Get groups - GET Successful
https://api.powerbi.com/v1.0/myorg/groups/{group-Id}/reports - Get reports in a group - GET Successful
https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken - Generate Token for POWER BI Embed control - GET Fails.
The body passed for the GenerateToken function is
{
 "accessLevel": "View"
}
However the response is
{
    "error": {
        "code""Unauthorized",
        "message""User is not authorized"
    }
}
This was working for almost 3 months and we haevnt changed any permissions on the user. Infact we have as part of our testing/trouble shooting  efforts allocated all Power BI permissions in Azure Application setup.
I cant figure out what could have changed. Any directions as to where we should be looking/trouble shooting? Appreciate any help
Regards
Sid
0 REPLIES 0

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.