Forum Discussion
Trying to use Rest API to Refresh power BI data source via PowerShell and Gateway
- Anonymous8 years ago
Hi,
I agree that it's a powershell issue but I thought I would post here since it was in relation to Power BI. I figured out the issue on my own. These are the two pieces of code I had to update to make the sample work (in case anyone is interested in doing this too):
$authHeader = @{
Authorization=$token.CreateAuthorizationHeader()
Content='application/json'
}long dashes to short dashes:
Invoke-RestMethod -Uri $uri -Headers $authHeader -Method POST -Verbose
Hi Anonymous,
It seems to be that the issue is more related PowerShell, So I would suggest post it on PowerShell forum for better assistance. :smileyhappy:
In addition, here is a similar thread for your reference.
Regards
- Anonymous8 years agoNot applicable
Hi,
I agree that it's a powershell issue but I thought I would post here since it was in relation to Power BI. I figured out the issue on my own. These are the two pieces of code I had to update to make the sample work (in case anyone is interested in doing this too):
$authHeader = @{
Authorization=$token.CreateAuthorizationHeader()
Content='application/json'
}long dashes to short dashes:
Invoke-RestMethod -Uri $uri -Headers $authHeader -Method POST -Verbose