Forum Discussion
Asynchronous refresh with the PBI API, unable to locate refreshid from POST to refreshes
Hi lbendlin,
That's correct and my current workaround. However I am really curious why POST does not return a location header since the documentation states:
The response also includes a location response-header field to point the caller to the refresh operation that was just created/accepted. Location is that of the new resource which was created by the request, which includes the refreshId.
of course the documentation could never be wrong...
Invoke-PowerBIRestMethod (MicrosoftPowerBIMgmt.Profile) | Microsoft Docs
It sure returns a System.Object . It just happens to be empty. What I think is happening is that the implementation is stripping away the headers
powerbi-powershell/InvokePowerBIRestMethod.cs at master · microsoft/powerbi-powershell · GitHub
You may need to reinvent the wheel and do all the HTTP calls manually to get the response headers. Might not be worth the effort.