Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request-PBIDatasetRefresh started failing #66

Open
JeffWRush opened this issue Aug 27, 2020 · 2 comments
Open

Request-PBIDatasetRefresh started failing #66

JeffWRush opened this issue Aug 27, 2020 · 2 comments

Comments

@JeffWRush
Copy link

I started encountering an issue using the following about two weeks ago. It had been working fine, but then I started seeing an exception without any code changes.

$pbiResponse = Request-PBIDatasetRefresh -authToken $authToken -dataset $datasetId -groupId $groupId

I believe the default of GET is applied to method so I was wondering if that became a problem for some reason or the default target url is having problems. Any ideas here?

Exception:

[Error] ERROR: Invoke-RestMethod : {"error":{"code":"PowerBIEntityNotFound","pbi.error":{"code":"PowerBIEntityNotFound","parameters":{},"details":[],"exceptionCulprit":1}}}At D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1:2375 char:19+ ... $result = Invoke-RestMethod -Uri $url -Headers $headers -Method $me ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidOperation: (Method: GET, Reques\u2026PowerShell/6.2.6}:HttpRequestMessage) [Invoke-RestMethod], HttpResponseException+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommandScript stack trace:at Invoke-PBIRequest, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2375at Get-PBIDataSet, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 908at Request-PBIDatasetRefresh, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2015at , D:\home\site\wwwroot\RefreshData\run.ps1: line 39Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: Invoke-RestMethod : {"error":{"code":"PowerBIEntityNotFound","pbi.error":{"code":"PowerBIEntityNotFound","parameters":{},"details":[],"exceptionCulprit":1}}}At D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1:2375 char:19+ ... $result = Invoke-RestMethod -Uri $url -Headers $headers -Method $me ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidOperation: (Method: GET, Reques\u2026PowerShell/6.2.6}:HttpRequestMessage) [Invoke-RestMethod], HttpResponseException+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommandScript stack trace:at Invoke-PBIRequest, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2375at Get-PBIDataSet, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 908at Request-PBIDatasetRefresh, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2015at , D:\home\site\wwwroot\RefreshData\run.ps1: line 39Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)Exception: Response status code does not indicate success: 404 (Not Found).Stack: at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
2020-08-27T19:04:41.664 [Error] ERROR: Invoke-RestMethod : {"Message":"API is not accessible for application"}At D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1:2375 char:19+ ... $result = Invoke-RestMethod -Uri $url -Headers $headers -Method $me ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidOperation: (Method: POST, Reque\u2026PowerShell/6.2.6}:HttpRequestMessage) [Invoke-RestMethod], HttpResponseException+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommandScript stack trace:at Invoke-PBIRequest, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2375at Request-PBIDatasetRefresh, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2018at , D:\home\site\wwwroot\RefreshData\run.ps1: line 39Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 403 (Forbidden).at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: Invoke-RestMethod : {"Message":"API is not accessible for application"}At D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1:2375 char:19+ ... $result = Invoke-RestMethod -Uri $url -Headers $headers -Method $me ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidOperation: (Method: POST, Reque\u2026PowerShell/6.2.6}:HttpRequestMessage) [Invoke-RestMethod], HttpResponseException+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommandScript stack trace:at Invoke-PBIRequest, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2375at Request-PBIDatasetRefresh, D:\home\site\wwwroot\PSModules\powerbips.2.0.4.5\PowerBIPS.psm1: line 2018at

@JeffWRush
Copy link
Author

JeffWRush commented Aug 27, 2020

In addition I have no errors executing the following against the same datasets.

Get-PBIDatasetRefreshHistory -dataset $datasetId -groupId $groupId -authToken $authToken

@RuiRomano
Copy link
Contributor

HI Jeff, thats strange. Just tested the cmdlet with same parameters and ran without any error.
The method uses is POST but I do a GET to ensure the dataset exists:
image.

The problem could be because of the Azure AD Application we use (053e0da1-7eb4-4b9a-aa07-6f41d0f35ce)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants