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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
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.