Forum Discussion
Embedding report - unauthorized when report is shared
- 8 years ago
Thank you, v-micsh-msft
I think I figured it out myself.
Since the users with which I shared the report were not members of the group, the line:
client.Reports.GetReportInGroup(GroupId, ReportId);
failed with 401 obviously, because the access to the group was denied.
Then I did this:
client.Reports.GetReports()
and from the list I received I filtered the report I needed and then it worked.
Thanks!
Try to switch the user token to
Access token for non-Power BI users (app owns data)
This way should make the App be able to display reports correctly.
More information, please check:
Authenticate users and get an Azure AD access token for your Power BI App
Regards,
Michael
Thank you, v-micsh-msft
I think I figured it out myself.
Since the users with which I shared the report were not members of the group, the line:
client.Reports.GetReportInGroup(GroupId, ReportId);
failed with 401 obviously, because the access to the group was denied.
Then I did this:
client.Reports.GetReports()
and from the list I received I filtered the report I needed and then it worked.
Thanks!