问题
I am trying to Embedding my Power Bi Reports in my MVC application using the following link https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-customers and i am able to get the access_token but unable to retrieve the dashboards or reports based on Group Id because of 401 Unauthorized error.
Let me know what I am doing wrong.
回答1:
I faced the exact same issue during my Power BI Embedded implementation. The issue in my case was that adequate Permission were not granted for the registered app in Azure Active Directory. Please ensure you have performed the following steps:
- Register your App (Native or Web App) in Azure Active Directory under App Registrations. Or use the Power BI Developer Console to do that - Azure Active Directory Preferred
- Added the Power BI API to the registered app from Permissions Option.
- Select and Delegate all the required permissions for the Power BI API
- Most Important Grant All Permissions to the Registered App. If you don't have Admin Access to Azure Portal, you will not able able to grant the permissions
More details can be found here.
来源:https://stackoverflow.com/questions/49491759/unauthorized-error-401-for-power-reports-embedding