Forum Discussion
Update connection , dataset credentials Using Rest API
Hello dear members,
I hope you are doing well.
Every 90 days there is a company policy to change our passwords. Every time we need to update manually power bi connections.
Is there a way to use Rest Api to update the credentials programmatically? Ususally the data source is a cloud service like Aure and not on prem.
If not is there any other way to achieve that?
Thank you in advance
Hi
Have you looked at using a service principal account where the password only expires every two years? This will allow you to not have to change the password every 90 days.
- Enable Service Principal Authentication for Read-Only Admin API’s
- Create an Azure AD app
- Ensure there are no Power BI admin-consent required permissions on the application
- Create a client secret / key and copy the value for later use
- Create a new Security Group in AD, add the app to the group
- Enable Allow Service Principals to use read-only Power BI admin API’s in the Power BI Tenant
- Anonymous1 year ago
Hi Dimitris_Kats,
Thank you for reaching out to Microsoft Fabric Community Forum.
Please refer to the document below for instructions on updating dataset credentials programmatically.
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to give "Kudos"Regards,
Vinay Pabbu
Regards,
Vinay Pabbu
7 Replies
- GilbertQSuper User
Hi
Have you looked at using a service principal account where the password only expires every two years? This will allow you to not have to change the password every 90 days.
- Enable Service Principal Authentication for Read-Only Admin API’s
- Create an Azure AD app
- Ensure there are no Power BI admin-consent required permissions on the application
- Create a client secret / key and copy the value for later use
- Create a new Security Group in AD, add the app to the group
- Enable Allow Service Principals to use read-only Power BI admin API’s in the Power BI Tenant
- Dimitris_KatsHelper V
Thank you so much GilbertQ
This is very helpful. I will investigate that option for sure.
Since I was requested to update the credentials using Rest Api, I was wondering if this is possible and how.
Thank you so much again 🙂
- AnonymousNot applicable
Hi Dimitris_Kats,
Thank you for reaching out to Microsoft Fabric Community Forum.
Please refer to the document below for instructions on updating dataset credentials programmatically.
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to give "Kudos"Regards,
Vinay Pabbu
Regards,
Vinay Pabbu - AnonymousNot applicable
Hi Dimitris_Kats,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Vinay Pabbu
- AnonymousNot applicable
Hi Dimitris_Kats,
May I ask if you have gotten this issue resolved?If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Vinay Pabbu
- AnonymousNot applicable
Hi Dimitris_Kats,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Vinay Pabbu
- Amy007Frequent Visitor
Yes updating credentials is possible using the new Update Connections api ,It works for Power BI.
ShareableCloud connection Connections - Update Connection - REST API (Core) | Microsoft Learn