Forum Discussion

sato89's avatar
sato89
Helper I
7 years ago
Solved

Power BI Server and REST calls by angular app

Hi everyone, I installed an instance of Power BI Server with some reports on a computer and I can view the reports in embed version inside a web-app by adding the parameter "?rs:embed=true" to the r...
  • Anonymous's avatar
    Anonymous
    7 years ago

    The simplest of the PBIRS API calls is as shown in the screenshot. 

    Here is the code if you want to invoke the same API call using PowerShell 

     

    $Cred = Get-Credential
    $Url = "http://powerbi.local/Reports/api/v2.0/Me"
    #Invoke-RestMethod -Method 'GET' -Uri $Url -UseDefaultCredentials -OutVariable UserContext
    Invoke-RestMethod -Method 'GET' -Uri $Url -Credential $Cred -OutVariable UserContext
    echo $UserContext

     

     

    Here is the list of PBI RS APIs that you can play with.

     

    Please accept the solution, if you agree.

     

    Cheers,

    Hari T

     

     

  • Anonymous's avatar
    Anonymous
    7 years ago

    You can set your cedentials at the GET request level by choosing the Authorization method as "NTLM Authentication".

     

    This is when you are on windows and using Windows Authentication. You can also set the Domain of your Org. in the advanced properties.

     

    Cheers,

    Hari T