Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Embedded report editing save error

I am working on integrating Power BI reports into our web application. The embedding works fine in general, reports show up properly on our web pages. In read mode. But after switching to edit mode and attempting saving, the below error is thrown.

 

Something went wrong

Unable to save the report
Please verify you have the right permissions or contact support. If you contact support, please provide these details.

 

pbi save report error.png

 

I use models.Permissions.All in the embed configuration, and in the application registration required permissions I set up all the Power BI Service permissions. So what permission is missing? There is a number of permissions listed, but none of them has anything to say about saving reports. "Create content" seems to be the most relevant, and that one is ticked too.

I cannot give more permission than what there is already.

 

Any idea would be appreciated.

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee

@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).

Capture1.PNG

 

2. Login O365 portal and view your account, then revoke the permission.

Capture2.PNG

 

3. Then embedded reports in edit mode with the accesstoken can be edited and saved.

Capture3.PNG

View solution in original post

4 REPLIES 4
Eric_Zhang
Employee
Employee

@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).

Capture1.PNG

 

2. Login O365 portal and view your account, then revoke the permission.

Capture2.PNG

 

3. Then embedded reports in edit mode with the accesstoken can be edited and saved.

Capture3.PNG

Anonymous
Not applicable

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 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? 😉

Anonymous
Not 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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.