Forum Discussion
PowerBI Embedded SaveAs functionality Not Working
- 1 year ago
Hi swapnil196 ,
Thank you for reaching out to us on the Microsoft Fabric Community Forum. This error happens because of limited permissions, licensing issues, or workspace ownership problems.
1. Even if the Service Principal is properly set up, it needs the correct role in the Power BI workspace to save reports.
If it's set as Viewer or Member, change it to Contributor or Admin.
Reference: Workspaces in Power BI - Power BI | Microsoft Learn
2. For the Service Principal to use the saveAs() function, make sure API access is enabled in the Power BI Admin settings.
Apply this setting to the Security Group that includes the Service Principal.
3. The saveAs() function only works for reports that are part of the workspace.
Make sure the report isn’t linked or shared from a different workspace. If needed, recreate the report within the workspace itself.
4. If you're using Power BI Pro, ensure the Service Principal has a Pro license.
If you're using Power BI Embedded, make sure the workspace is in Premium Capacity.
Verify that the workspace is assigned to Premium Capacity or confirm the Service Principal has a Power BI Pro license.
Reference: Power BI Premium Per User - Power BI | Microsoft Learn
5. Even if the Service Principal can access the report, it still needs Build permissions on the dataset to save changes.
If the permissions were updated recently, make sure to refresh them using the Power BI REST API.
As an alternative solution.
if the saveAs() function isn't working, consider using the Clone Report API. This API enables you to create a duplicate copy of the report.
I hope this heps. If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi swapnil196 ,
Thank you for reaching out to us on the Microsoft Fabric Community Forum. This error happens because of limited permissions, licensing issues, or workspace ownership problems.
1. Even if the Service Principal is properly set up, it needs the correct role in the Power BI workspace to save reports.
If it's set as Viewer or Member, change it to Contributor or Admin.
Reference: Workspaces in Power BI - Power BI | Microsoft Learn
2. For the Service Principal to use the saveAs() function, make sure API access is enabled in the Power BI Admin settings.
Apply this setting to the Security Group that includes the Service Principal.
3. The saveAs() function only works for reports that are part of the workspace.
Make sure the report isn’t linked or shared from a different workspace. If needed, recreate the report within the workspace itself.
4. If you're using Power BI Pro, ensure the Service Principal has a Pro license.
If you're using Power BI Embedded, make sure the workspace is in Premium Capacity.
Verify that the workspace is assigned to Premium Capacity or confirm the Service Principal has a Power BI Pro license.
Reference: Power BI Premium Per User - Power BI | Microsoft Learn
5. Even if the Service Principal can access the report, it still needs Build permissions on the dataset to save changes.
If the permissions were updated recently, make sure to refresh them using the Power BI REST API.
As an alternative solution.
if the saveAs() function isn't working, consider using the Clone Report API. This API enables you to create a duplicate copy of the report.
I hope this heps. If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.