The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am trying to user a service principal account to automatically refresh the data within a workspace. Currently a user has to authenticate every week. We have a workspace with a gateway and a number of connections, but I can't work out how to add the service principal account so that the data refreshes using that account.
Any advice would be greatly appreciated.
Solved! Go to Solution.
@dw014_ You can have the user logon using the service principal account and publish the report. Also, you can refer to this thread: Using Service Account instead of Individual Accoun... - Microsoft Fabric Community
Hi @dw014_ ,
Thank you for reaching out to the Microsoft Community Forum.
Please follow below steps to Enable Service Principal for Data Refresh via Gateway
1. You need to Register an App in Azure AD. Go to Azure Active Directory --> App registrations --> New registration. Use the Application (client) ID, Directory (tenant) ID, and create a client secret.
2. Grant the app permissions to Power BI Service (Dataset.ReadWrite.All, Gateway.ReadWrite.All). admin need to approve these permissions.
3. Need to Enable Service Principal in Power BI Admin Portal. Go to Power BI Admin Portal --> Tenant settings. Enable Service Principals for use with in Power BI APIs.
4. In Power BI Service, add the service principal as a member or admin of the workspace where the dataset resides.
5. Need to Configure Gateway Access. Go to Manage Gateways in Power BI Service. Add the service principal as a user of the data source and optionally as a gateway admin.
6. Need to check the dataset is bound to the correct gateway and data source. You need to use Power BI REST API or PowerShell to automate this. Use Power BI REST API for Refresh.
Authenticate using the service principal and acquire an access token.
Use the POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes endpoint to trigger a refresh.
Please refer Microsoft official document and community thread.
Create a connection with a service principal - Power Automate | Microsoft Learn
Service Principals in Fabric Data Warehouse - Microsoft Fabric | Microsoft Learn
Solved: How to configure service principal for a data sour... - Microsoft Fabric Community
Solved: Service Principal or Microsoft Account in refreshi... - Microsoft Fabric Community
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi @dw014_ ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
Hi @dw014_ ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
Hi @dw014_ ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
@dw014_ You can have the user logon using the service principal account and publish the report. Also, you can refer to this thread: Using Service Account instead of Individual Accoun... - Microsoft Fabric Community
User | Count |
---|---|
43 | |
15 | |
12 | |
11 | |
8 |
User | Count |
---|---|
51 | |
31 | |
20 | |
18 | |
15 |