Forum Discussion

meiwah's avatar
meiwah
Resolver I
4 years ago

Power BI Rest API Postman "Try-it"

Hi, I used to obtain the Access Token from the "Try-it" feature at https://docs.microsoft.com/en-us/rest/api/power-bi/admin  

 

But now it is unavailable, so I used Postman, with the below parameters and settings. I suspect there is some problem with the parameters used or settings as Scopes is not returned, although the Access Code is returned. 

An access token is generated and I copy & paste into the below REST API, I've got an unauthorized error.

 

Is there anything which I've missed out? Any parameters or settings wrongly configured? Thk u very much!

 

4 Replies

  • If you in Postman go to the authorization tab and there you can choose bearer token. Paste the token only (NOT bearer in front) it should work.

     

    BR

    Marius

    • meiwah's avatar
      meiwah
      Resolver I

      Hi Mariussve1, thks! I've pasted the Access Token under the Authorization tab in Postman but I still get the error "Unauthorized". Pls help

       

       

       

      • mariussve1's avatar
        mariussve1
        Solution Sage

        Are you using Service Principal (Tenant-, -App and Secret ID) ?
        If yes, then you need to put this service principal in a security group in AAD (Azure AD). Then you have to permit this security group to the workspace you are running the REST API against.

        If you want to use the admin API's you have to grant accesst to this in the tenant settings:

        Br

        Marius