Forum Discussion

Tweeg's avatar
Tweeg
Helper I
4 years ago
Solved

Authenticate REST API

It looks like changes were made to the REST API. The 'Try it' function from the page is gone so I tried do do it myself using Postman. When authenticating with my service principle, a lot of API ca...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Tweeg ,

    Actually, it is a known issue. The Power BI team is aware of this issue and is working on a fix. You can test the API by using an external API testing tool, such as the one you mentioned: Postman. There is no exact date for a solution yet, but I will update you with any progress later. You can check the following official documentation for details on this known issue.

    Known issue - Try it button missing on REST API pages

    Regarding the authorization issue you mentioned, you can refer to the below methods in this thread to resolve it.

    1. Call the GenerateToken API

    Power BI REST API using postman - generate embed token.

    Note: 

    1) You will likely need to create the App registration FOR YOUR ORGANIZATION (i.e. User Owns Data option)

    2) Make sure to record the Application Secret which is displayed on your screen after the app is registered

    3) When granting permissions in the Azure Portal, be sure to check "Grant Permissions for [Your Organization Name]"


    2. Extract token using Powershell

    Please follow below video to extract token using Powershell.
    https://www.youtube.com/watch?v=f7HLyiAk-lQ (Credits - Adam(#GuyInACube))

    Note - if you're using powershell for the first time, U will need to install Powerbi Module by running below command in Powershell as adminstrator.

    Install-Module -Name MicrosoftPowerBIMgmt


    Best Regards