Forum Discussion

bschnurr's avatar
bschnurr
Microsoft Employee
4 years ago
Solved

powershell post to push/streaming dataset Unauthorized

Just started happening since sat april 23.

 

using the dataset' s generated powershell code example (user data replaced with XXX), no fails.

 

Invoke-RestMethod : The remote server returned an error: (401) Unauthorized.

 

 

$endpoint = "https://api.powerbi.com/beta/XXX/datasets/XXX/rows?key=XXX"
$payload = @{
"foo" =98.6
}
Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))

 

 

not using auth, but the docs say its not needed.

Real-time streaming in Power BI - Power BI | Microsoft Docs

4 Replies

  • bschnurr's avatar
    bschnurr
    Microsoft Employee

    any new streaming dataset I create has the same issue with both the sample "curl" or "powershell" push example

  • epopova's avatar
    epopova
    Microsoft Employee

    I have the same problem! Connection worked earlier and now it doesn't

  • bschnurr's avatar
    bschnurr
    Microsoft Employee

    I see its working again now magically.... 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi bschnurr ,

      Does that make sense? If so, kindly mark your answer as the solution to close the case please. Thanks in advance

       

      Best Regards

      Community Support Team _ Polly

       

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.