cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors