Forum Discussion
Embedded report editing save error
- 9 years ago
Anonymous
Most probably the reason is that the accesstoken has insufficient permisson.
To get a accesstoken with sufficient permission,
For Power BI Embedded, you can reference this github repo.
For Power BI Services,
1.Login in Azure portal and check the "read and write all reports" for the registered azure active directory app(the aad app registered at http://dev.powerbi.com/apps).
2. Login O365 portal and view your account, then revoke the permission.
3. Then embedded reports in edit mode with the accesstoken can be edited and saved.
Anonymous
Most probably the reason is that the accesstoken has insufficient permisson.
To get a accesstoken with sufficient permission,
For Power BI Embedded, you can reference this github repo.
For Power BI Services,
1.Login in Azure portal and check the "read and write all reports" for the registered azure active directory app(the aad app registered at http://dev.powerbi.com/apps).
2. Login O365 portal and view your account, then revoke the permission.
3. Then embedded reports in edit mode with the accesstoken can be edited and saved.
Hi Eric_Zhang,
Thanks for the advice. The issue was indeed the lack of permission on the read and write all reports permission set. The funny thing is that it was already set on the Azure portal application registration requested permission list. But I had to revoke the permission, and grant it again. Which I expected to be warned about to provide consent again as the required permissions' list has changed - a long time ago. But it did not happen. Probably a bug there.
Now that I revoked the permission, and wanted to grant it again, I discovered that some of the requested permissions -not related to Power BI- have become admin consent too. Which made it impossible to grant them myself again. Maybe that's the reason for the bug.
Anyways, after removing the culprit permissions, the report saving works like a charm. It was just really cumbersome to figure this out. The requested permissions seemed to be ok, while I needed to provide consent again. But I wasn't prompted for it, while the solution worked with the previous set of permissions' list. Weird. Afterl all now I know how to fix the issue, if my users will complaint about it.
- Eric_Zhang9 years ago
Microsoft Employee
Anonymous wrote:
Hi Eric_Zhang,
Thanks for the advice. The issue was indeed the lack of permission on the read and write all reports permission set. The funny thing is that it was already set on the Azure portal application registration requested permission list. But I had to revoke the permission, and grant it again. Which I expected to be warned about to provide consent again as the required permissions' list has changed - a long time ago. But it did not happen. Probably a bug there.
Now that I revoked the permission, and wanted to grant it again, I discovered that some of the requested permissions -not related to Power BI- have become admin consent too. Which made it impossible to grant them myself again. Maybe that's the reason for the bug.
Anyways, after removing the culprit permissions, the report saving works like a charm. It was just really cumbersome to figure this out. The requested permissions seemed to be ok, while I needed to provide consent again. But I wasn't prompted for it, while the solution worked with the previous set of permissions' list. Weird. Afterl all now I know how to fix the issue, if my users will complaint about it.
Anonymous
I just happened to test embedding creating mode reports in Power BI Embedded and got a similar error as yours. So I was inspired that you may encouter a permission issue. When checking the permission of the registered APP, I just saw that "read and write all reports" unchecked.
Usually when doing troubleshooting on accesstokens I decode them at https://jwt.io and look up the decoded fields at Azure AD token reference.
As to consent windows not prompted, it looks like a bug and it seems nothing to do with Power BI but Azure AD related I think. Have you tried to restart your application?
If you have no further questions, could you please accept the replies making sense as solution to close this thread? ;)
- Anonymous9 years agoNot applicable
Yes, I restarted the app (revoke all permissions, then set them again, finally grant the permissions as my account once more), and then the solution worked.
Thanks for the tip regarding decoding the token reference. It may be helpful later on. Probably when working out why reports from any workspace other than my own personal one don't work - even those which I created myself and still am the auther of. I bet there will be something similar again.