Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I have been using Power BI dataset refresh with Powershell for a long time, and everything works like a charm...but I am facing a new problem.
I have created two datasource with the same server Teradata, but with different users (and differents access rights).
I have a dataset connected to datasource1, and another dataset connected to datasource2.
When I try to refresh the second dataset from the service, everything is ok, but when I try to do it from our Powershell scripts, the refresh fails because it uses datasource1 rather than datasource2...
Does anybody face the same issue and find a workaround ?
Thanks for your help
Solved! Go to Solution.
Hello and thanks for the answer.
I found what was wrong in my api calls.
I was using the api "Datasets - Bind To Gateway" (Datasets - Bind To Gateway - REST API (Power BI Power BI REST APIs) | Microsoft Docs) but by design :
That was the explanation !
Maybe it will help future usages.
Hi @FXFelix,
According to your decision, it seems like PowerShell has cached the credentials that you inputted at the first operations. When you work with the second operation which requires different credentials, PowerShell uses the cached one for authorization and it failed due to credentials not matching.
If that is the case, I think you may need to do some cache clear or sign-out operations before you do the second one.
Regards,
Xiaoxin Sheng
Hello and thanks for the answer.
I found what was wrong in my api calls.
I was using the api "Datasets - Bind To Gateway" (Datasets - Bind To Gateway - REST API (Power BI Power BI REST APIs) | Microsoft Docs) but by design :
That was the explanation !
Maybe it will help future usages.