cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 403 error while trying to Embedding powerbi report on android app

STEP #1 - Need to get authenticated by MS server via an Auth library called MSAL ()https://github.com/AzureAD/microsoft-authentication-library-for-android.  This will provide the access token for the user.  This token also has some privileges to access the MS resources like Power BI.

 

STEP #2 - Using the access token from the previous step we can call Power BI Rest API by providing that token as a Bearer {token} in Authentication header. There are lot of APIs available eg.. dashboards / dashboard by ID etc.,  if we call the dashboards API it will respond with list of dashboards available in the workspace and an embed URL of it.

 

STEP #3: - We then need to use the Power BI JS SDK to render the report using the embed URL we got from previous step.

 

Right now, i could get the access token from Step #1 and when i use it in Step #2 i get 403 error.  When i search online about this error people are telling that the user (user associated with power bi login) might not have enough privileges to call Power BI Rest APIs.  I am not an Power BI expert.  So i am really not sure how to resolve this access token related issue.  It will be great if we can get some help from someone internally or from Microsoft.

Status: New
Comments
Community Support

@Blueeeagle ,

 

You need to firstly purchase a pro license for your power bi account, then register an Azure AD application so that you can call rest api without receive 403 error. 

 

About how to register an Azure AD application, I would suggest you follow the doc below:

https://docs.microsoft.com/en-us/power-bi/developer/embedded/register-app

 

Regards,

Jimmy Tao

New Member

Thanks for your reply

 

We have Pro Account and successfully registered on Azure Ad application.

 

Getting proper response on microsoft api but not on mobile app