我们想在我们的asp.net core angular 5解决方案中嵌入预定义的"Voice of the Customer for Dynamics 365"仪表板 . 可以轻松嵌入示例仪表板或报表,但在尝试生成EmbedToken时,提到的仪表板将返回HTTP 403(禁止) .
我看到的问题是此仪表板在定义的工作区中不可用,因为它是通过服务内容包创建的(在Power BI中:获取数据 - >服务内容包 - >客户分析的声音 - >登录到DYN365) . 这样,仪表板不是可管理工作空间的一部分,并且用于创建embedtoken的文档说,它只能在工作空间上下文中使用(https://docs.microsoft.com/en-us/rest/api/power-bi/embedtoken) . 有趣的是,我可以检索有关调用GetDashboardsAsync()时禁止的仪表板的信息 .

这是我的示例代码(不使用提到的仪表板):

var tokenResp = await client.Dashboards.GenerateTokenAsync(dashboardId, generateTokenRequestParams);

带有示例报告的工作代码是:

var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(groupId, reportId, generateTokenRequestParams);

我会使用相同的api,但提到的仪表板不提供有关其工作区或包含组的信息 . 我还尝试使用值为“我”的GenerateTokenInGroup作为groupId,但没有成功 .

How can we embed dashboards or reports that are visible as apps in Power BI?