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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

0

API Issue when Response Code is 403

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. 

 

armely_0-1673528482329.png

 

compared to a 404 

armely_1-1673528556763.png

 

 

Status: Delivered

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

Comments
v-xiaoyan-msft
Community Support
Status changed to: Delivered

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

@v-xiaoyan-msft 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_0-1673959973132.png

 

armely
Helper I

@v-xiaoyan-msft please confirm that something was changed, we have been testing and it seems to be working now but need to understand what changed.