Forum Discussion
Help: Web API works in Desktop but disconnected in Service
- 1 year ago
Hi Chief,
the first step is to create a free Azure account at https://azure.microsoft.com/free.
Once signed in, they should go to the Azure portal and register a new app under Azure Active Directory > App registrations and name the app (e.g., “PowerBI_API_App”), choose “Single tenant,”. After registering, generate a client secret under “Certificates & secrets” and copy the value immediately, as it won’t be shown again.Next, assign API permissions to the app by going to “API permissions,” selecting “Power BI Service,” and adding delegated permissions like Dataset.Read.All, Report.Read.All, and Workspace.Read.All. Admin consent must be granted for these permissions to take effect.
Then, in the Power BI Admin Portal (https://app.powerbi.com/admin-portal), enable tenant settings to allow service principals to use Power BI APIs and access workspaces. Finally, go to the Power BI workspace, click “Access,” and add the registered app (service principal) with a role like Member or Admin.
This setup allows Power BI Service to authenticate securely using the app instead of relying on unsupported API key headers.
Hope above setup resolves your query and with little research you will be able overcome permission issues in your usecase mentioned above
Thanks,
Prashanth Are
MS fabric community support
Hi Chief,
Am attaching a similar type of thread link there they also used some API's to refresh there dataset see the thread and follow the steps or the lines of code what they used and what not done by you i think this will get your issue resolved.
Solved: Refreshing data from REST API works on Desktop, fa... - Microsoft Fabric Community
thanks,
Prashanth Are
Thanks for the tip. I did try that and still does not refresh. There is a work around to set up an API that pulls data into database on my server and point the PBI Service query to that instead of the direct source. The only problem is it's a work around. I'm not fully understanding why desktop would pass it fine and service hangs up but will probably be addressed at some future point. From my reading I think I could use Azure to hold my API keys and pass the query through that but I don't have the Azure service subscription and don't know anything about how it works.
- v-prasare1 year ago
Community Support
Hi Chief,
the first step is to create a free Azure account at https://azure.microsoft.com/free.
Once signed in, they should go to the Azure portal and register a new app under Azure Active Directory > App registrations and name the app (e.g., “PowerBI_API_App”), choose “Single tenant,”. After registering, generate a client secret under “Certificates & secrets” and copy the value immediately, as it won’t be shown again.Next, assign API permissions to the app by going to “API permissions,” selecting “Power BI Service,” and adding delegated permissions like Dataset.Read.All, Report.Read.All, and Workspace.Read.All. Admin consent must be granted for these permissions to take effect.
Then, in the Power BI Admin Portal (https://app.powerbi.com/admin-portal), enable tenant settings to allow service principals to use Power BI APIs and access workspaces. Finally, go to the Power BI workspace, click “Access,” and add the registered app (service principal) with a role like Member or Admin.
This setup allows Power BI Service to authenticate securely using the app instead of relying on unsupported API key headers.
Hope above setup resolves your query and with little research you will be able overcome permission issues in your usecase mentioned above
Thanks,
Prashanth Are
MS fabric community support
- Chief1 year ago
Helper II
This seems like a good solution. I was able to create a 'workaround' by exporting data to a sharepoint file and pointing my power bi source there...I would like to try this in the future.