Forum Discussion
Power BI Server and REST calls by angular app
- Anonymous7 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 $UserContextHere is the list of PBI RS APIs that you can play with.
Please accept the solution, if you agree.
Cheers,
Hari T
- Anonymous7 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
There is no functional difference between evaluation edition and full enterprise, aside from a timebomb and licensing rules. You can use the evaluation edition for purposes of dev/test and demo's. Running it in any production evironment will require the appropriate SQL enterprise core or PowerBI premium licenses.
Thank you for your reply!
So, how can I obtain the embedded token for my REST calls to PBI Server? I tried to implement a REST call from an Angular app but I didn't know the correct way to get this token.
My reports are published on a PBI Server instead of PBI Services (app.powerbi.com).
Thank you!
Best regards.
- Anonymous7 years agoNot applicable
I haven't tried Angular to make the Rest Api calls but used powershell/postman to make the calls. You can set the security context at the request level or Collection level while making an API call. This worked like a charm for me.
Cheers,
Hari T
- sato897 years agoHelper IThank you Harikishant.
Can you give me an example please?- Anonymous7 years agoNot applicable
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 $UserContextHere is the list of PBI RS APIs that you can play with.
Please accept the solution, if you agree.
Cheers,
Hari T