Forum Discussion
Update datasource credential using API with Cloud connection
What I am trying to do is that update the credential using API that is created with Shareable Cloud Connection. Databricks Access Token expires every 30 days so it makes a lot of sense to schedule a notebook job to update the access token without manually changing it in Power BI connection.
I have another connection as well that is created with On-premise and I can execute my notebook successfully with updating credential.
The challenge I have right now is updating the credential that is created with Sharable Cloud Connection.
I can get the datasourceId and gatewayId as that is needed to update the credential
When I try executing this API I am getting a response of PowerBINotAuthorized
Now my question is where is that gateway that is used with Cloud Connection? It shows there is a gateway but where is that and how to provide permission so that I can execute that API? That is only missing piece to successfuly execute the notebook. Just permission with the gateway.
Even with Personal Cloud Connection will have gateway returned if you call the API it will show datasourceId and gatewayId
Hi rdlhrvy ,
Go to manageconnections and gateways in power bi service and check whether that connection is still available or not.
Thanks,
Sai Teja
- rdlhrvy2 years agoHelper I
The shared cloud connection that was created is there. I can even use that connection to any dataset published that used the same connection.
It is only updating the credential for that connection is the issue using API. I can update manually but not with API
- SaiTejaTalasila2 years agoSuper User
Hi rdlhrvy ,
You can check with your tenant admin once if he is unable to find it then you can open a ticket with MS support.
I think the rest API command which you are trying to use only works with gateway connections and not for cloud connections.
Thanks,
Sai Teja