When the API response code is 403, the body is empty. It would be helpful to get the body to do error trapping in the API workflow process.
compared to a 404
3 Comments
- AnonymousNot applicable
Hi armely ,
A 403 error can occur for any of the following reasons. A fiddler capture may be required to investigate further.
- The user has exceeded the amount of embed token that can be generated on a shared capacity. Purchase Azure capacities to generate embed tokens and assign the workspace to that capacity. See Create Power BI Embedded capacity in the Azure portal.
- The Azure AD auth token expired.
- The authenticated user isn't a member of the group (workspace).
- The authenticated user isn't an admin of the group (workspace).
- The authenticated user doesn't have permissions. Permissions can be updated using refreshUserPermissions API
- The authorization header may not be listed correctly. Make sure there are no typos.
For more you may refer to
Troubleshoot Power BI REST APIs - Power BI | Microsoft Learn
Best regards.
Community Support Team_ Caitlyn - armely
Helper I
Anonymous the issue is not getting the 403 error, we do get that and we know why we are getting it "expired token" the issue is error message is not depicted even on Power BI Rest API Try page Reports - Get File Of Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
The expectation would be to get a message as follows
{"error":{"code":"TokenExpired","message":"Access token has expired, resubmit with a new access token"}}
Why is the error message not depicted?
- armely
Helper I
Anonymous please confirm that something was changed, we have been testing and it seems to be working now but need to understand what changed.