Closed dfazzani closed 1 year ago
Could you share a complete log file and screenshot of your parameters?
Could you try single quotes?
No luck I'm afraid Log attached PowerBIActionsLog.txt
Could you try to due the same locally by extracting the code?
Hi, I hope you are well.
I am experiencing a similar issue, I use the following JSON format: [ {"name": "Database", "newValue": "Value"}, {"name": "SQLServerInstance", "newValue": "Value"}] I receive a similar error to above: "Invalid Request". Please could you advise on how to resolve the issue?
Looks like the same issue could you try it locally
You have to make the Service Principal or User that is connecting to PBI the owner of the dataset to be able to update the parameters. This can be done with the TakeOwnership action.
You have to make the Service Principal or User that is connecting to PBI the owner of the dataset to be able to update the parameters. This can be done with the TakeOwnership action.
Yes, this works after adding a step for TakeOwnership for Service Principal.
Thanks for the update.
I'm using the Power BI Actions in DevOps. I can succesfully publish Power BI Reports using the tool, but now I am trying to update the parameter in a Data Source and I get the following issues (from the logs)
I have entered the name of a dataset and workspace
The json I'm using is [ { "name": "AzureServer", "newValue": "server.name.windows.net" } ]
2023-03-20T16:18:45.1549502Z ##[debug]Caught exception from task script. 2023-03-20T16:18:45.1586713Z ##[debug]Error record: 2023-03-20T16:18:45.2164069Z ##[debug]Invoke-API : InvalidRequest 2023-03-20T16:18:45.2205932Z ##[debug]At D:\a_tasks\PowerBIActions_d5b7fec6-2b25-4742-905b-0dad97687df5\5.4.39\ps_modules\PowerBI\PowerBI.psm1:238 char:9 2023-03-20T16:18:45.2224512Z ##[debug]+ Invoke-API -Url $url -Method "Post" -Body $body -ContentType ... 2023-03-20T16:18:45.2240021Z ##[debug]+, D:\a_tasks\PowerBIActions_d5b7fec6-2b25-4742-905b-0dad97687df5\5.4.39\run.ps1: line 208
2023-03-20T16:18:45.2584977Z ##[debug]at , : line 1
2023-03-20T16:18:45.2629718Z ##[debug]at , : line 22
2023-03-20T16:18:45.2646038Z ##[debug]at , : line 18
2023-03-20T16:18:45.2688683Z ##[debug]at , : line 1
2023-03-20T16:18:45.2719884Z ##[debug]Exception:
2023-03-20T16:18:45.2763277Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: InvalidRequest
2023-03-20T16:18:45.3029593Z ##[error]InvalidRequest
2023-03-20T16:18:45.3038029Z ##[debug]Processed: ##vso[task.logissue type=error]InvalidRequest
2023-03-20T16:18:45.3040565Z ##[debug]Processed: ##vso[task.complete result=Failed]
2023-03-20T16:18:45.3346340Z ##[section]Finishing: Power BI Action: UpdateDataSourceParameters
~~~~~~~~~~~~~ 2023-03-20T16:18:45.2255203Z ##[debug] + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException 2023-03-20T16:18:45.2270690Z ##[debug] + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-API 2023-03-20T16:18:45.2287165Z ##[debug] 2023-03-20T16:18:45.2310722Z ##[debug]Script stack trace: 2023-03-20T16:18:45.2363976Z ##[debug]at Invoke-API, D:\a_tasks\PowerBIActions_d5b7fec6-2b25-4742-905b-0dad97687df5\5.4.39\ps_modules\PowerBI\PowerBI.psm1: line 307 2023-03-20T16:18:45.2408143Z ##[debug]at Update-PowerBIDatasetParameter, D:\a_tasks\PowerBIActions_d5b7fec6-2b25-4742-905b-0dad97687df5\5.4.39\ps_modules\PowerBI\PowerBI.psm1: line 238 2023-03-20T16:18:45.2424353Z ##[debug]at Update-PowerBIDatasetParameters, D:\a_tasks\PowerBIActions_d5b7fec6-2b25-4742-905b-0dad97687df5\5.4.39\ps_modules\PowerBI\PowerBI.psm1: line 261 2023-03-20T16:18:45.2440878Z ##[debug]atAny ideas?