問題描述
我正在嘗試使用以下鏈接在我的 MVC 應(yīng)用程序中嵌入我的 Power Bi 報告 https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-customers 我可以獲得 access_token 但是由于 401 Unauthorized 錯誤,無法根據(jù) Group Id 檢索儀表板或報告.
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.
推薦答案
我在 Power BI Embedded 實(shí)施過程中遇到了完全相同的問題.我的問題是 Azure Active Directory 中的注冊應(yīng)用程序沒有授予足夠的權(quán)限.請確保您已執(zhí)行以下步驟:
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:
- 在 Azure Active Directory 中的應(yīng)用注冊下注冊您的應(yīng)用(本機(jī)或 Web 應(yīng)用).或使用 Power BI 開發(fā)人員控制臺來執(zhí)行此操作 - 首選 Azure Active Directory
- 從 Permissions Option 將 Power BI API 添加到已注冊的應(yīng)用程序中.
- 選擇并委派 Power BI API 所需的所有權(quán)限
- 最重要授予已注冊應(yīng)用的所有權(quán)限.如果您沒有 Azure 門戶的管理員訪問權(quán)限,您將無法授予權(quán)限
- 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
可以在此處找到更多詳細(xì)信息.
More details can be found here.
這篇關(guān)于電源報告嵌入的未經(jīng)授權(quán)的錯誤 401的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!