Forum Discussion
How to refresh a Power BI dataset using a flow from a Power App when the user only has Viewer grant
- 4 months ago
Hi Fern_21
You can use a Service Principal for this. Create an App Registration in Entra ID, grant it Contributor (or Member) role on the workspace, and configure the Power Automate flow to authenticate using the Service Principal's credentials instead of the user's.
This way, the actual refresh runs under the SP's identity (which has the required permissions), while the user stays as a Viewer and simply triggers the flow from the Power App. The user never needs elevated workspace access.
https://powerbi.microsoft.com/en-us/blog/refresh-your-power-bi-dataset-using-microsoft-flow/
https://www.nickyvv.com/2020/06/refresh-a-power-bi-dataset-with-powershell-and-a-service-principal.htmlThanks!
Natarajan Manivasagan
If you found this helpful, please consider giving it a Kudos and marking it as the accepted solution โ it goes a long way in helping others facing the same issue.๐ Best Solution for Enterprise BI โ 2026 Microsoft Fabric Semantic Link Developer Experience Challenge
๐ Microsoft announcement ยท View the winning notebookFor more Power BI tips and discussions, let's connect on LinkedIn.
Cheers!
Hi Fern_21 - User with viewer access in the ws cannot trigger a dataset refresh directly because dataset refresh requires additional previliges Build/Write/Contributor-level permissions.
you can tryto use power automate flow.
reference linkL
Share a cloud flow - Power Automate | Microsoft Learn
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Hope this helps.
Hi rajendraongole1 !
Sharing a cloud flow with run-only permissions
Instant flows (i.e., flows that use a manual trigger such as a button or item selection) can be shared using run-only permissions. Any user added as a run-only user does not have access to modify or change the flow in any way; they only have permissions to trigger the flow.
To add a run-only user:
On the flow details page, in the Run-only users section, select Edit.
In the Manage run-only permissions panel, specify the users and groups you want to provide run-only access to.
As the owner, you can specify whether run-only users must provide their own connections or can use a connection already defined in the flow.
In this way, the user can run the flow, but what permissions do they need in Power BI? I can only give them the Viewer role.
Thanks