Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
When ever new dataset is onboarded into powerbi service in settings we manully setup data source authentication. Is there any way to automate this I mean if any dataset onboarded it should refer predefined credentials.
I saw recently anouncement that can be achived
https://powerbi.microsoft.com/en-us/blog/use-power-bi-api-with-service-principal-preview/
Is there any alternate way or any custom code to achive it.
Solved! Go to Solution.
Ok. If this is just about the credentials to autenticate automatic refreshes you can use the Power Bi Rest API. It will depend on your data to know which request do you need. For example you can add new sources to gateway like this:
https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/createdatasource
If the source is the same you don't need to add. The gateway keeps the credentials.
If you are connecting to a cloud services without a gateway, you can configure the credentials with a request like this:
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources
There are a lot of more in that documentation in case you want to check whatelse you can automate. Remember that PowerShell contains a built library with methods to automate too in order to avoid API. That might be a second option.
I hope that helps,
Happy to help!
Hi. Can you explain what are you trying to do? There are different ways to use Power Bi. You can use it in the microsoft web portal known as "Service" or you can Embed it in a custom web app (additional license required). Only the second one will let you have "automatic authentication". Otherwise the Power Bi Service will always ask for a Azure AD login.
I hope that helps,
Happy to help!
Whenever power bi reports are deployed to microsoft web portal now we are manually authenticating the dataset in settings. Now we need to automate so whenever new dataset onboarded into power bi service(microsoft web portal) it should refere predefined credentials.
Is there anyway to write custom code and deploy it into power bi service to handle it.
Ok. If this is just about the credentials to autenticate automatic refreshes you can use the Power Bi Rest API. It will depend on your data to know which request do you need. For example you can add new sources to gateway like this:
https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/createdatasource
If the source is the same you don't need to add. The gateway keeps the credentials.
If you are connecting to a cloud services without a gateway, you can configure the credentials with a request like this:
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources
There are a lot of more in that documentation in case you want to check whatelse you can automate. Remember that PowerShell contains a built library with methods to automate too in order to avoid API. That might be a second option.
I hope that helps,
Happy to help!
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.