Forum Discussion
ivanferr92
6 years agoNew Member
Power BI REST API Update datasource credentials
Hi, Is it possible to use the Powerbi REST API to update the login credentials to a dataset? I found something similar for gateway-managed dataset: https://docs.microsoft.com/en-us/rest/api/powe...
- Anonymous6 years ago
HI ivanferr92,
I also check the rest API documents but not found any apis to direct operate the data source credentials. (some of API can update the connection strings but they not mention/contains any parameters to operate on data credentials)
I guess power bi service may not want to share them due to security reasons.Regards,
Xiaoxin Sheng
luke-novacek
Helper I
2 days agoIf it helps anyone still writing this by hand: the payload has to be encrypted the way Microsoft's SDK does it.
- 1024-bit gateway key: RSA-OAEP (SHA-1), in 85-byte pieces
- 2048-bit key: AES-256-CBC with HMAC-SHA256, both keys wrapped with RSA-OAEP (SHA-256)
There is a PowerShell port of it in GatewayLens, a free, open-source console for gateway admins that I wrote - see the CREDENTIAL ENCRYPTION section of GatewayLens.ps1: GatewayLens on GitHub