Forum Discussion

lbeaudoin's avatar
lbeaudoin
Frequent Visitor
5 years ago
Solved

API - Get refreshables with capacities and groups expanded

Hi dear PBI community,

 

I'm trying to query from my premium capacity all refresh with groups expanded from this documentation : 
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/getrefreshablesforcapacity#get-refreshables-with-capacities-and-groups-expanded

 

I get some results, but no information about groups like on the sample :
"group": { "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "name": "SalesMarketing" }

 

I'm using both the "Try It" button and a powershell version, with Power BI Admin capacity account and owner of severals workspaces (not all).

 

Any ideas ? thanks for your help

Laurent

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi lbeaudoin ,

     

    Are you able to get the Capacity and Groups expanded?

     

    you have confirmed on the PBI Tenant setting of API as enabled. Using "Try it" option in the browser you dont neet to pass application id.

    API call should be as below

    GET https://api.powerbi.com/v1.0/myorg/admin/capacities/{capacityId}/refreshables/{refreshableId}?$expand=capacity,group

     

     In the Try it now window, please check

     

    Parameters

    capacityid* <capid>

    refreshableid* <refid>

    $expand capacity,group (add $expand in name text box, capacity,group in value & click "+" button)

     

    Now click the Run button to get the 200 response.

     

    Please share error code in case you get any error.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi lbeaudoin ,

     

    This API needs your app to be registred. see below the pre-requisites,

     

    you have mentioned that you have tried with PBI Admin account so please register app(link attached on how to register) and check for Tenant API permissions. Then  use "Try-it" button and this shoud work. Please let me know if you are getting any issue/ error codes in the response. please accept the solution if it works.

    Admin - Get Refreshables For Capacity

    Returns a list of refreshables for the specified capacity the user has access to
    Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

    Required scope: Tenant.Read.All or Tenant.ReadWrite.All
    To set the permissions scope, see Register an app.

     

    Regards,

    Anonymous 

    • lbeaudoin's avatar
      lbeaudoin
      Frequent Visitor

      Hi nloiadn

      thank you for your answer. Unfortunatly it's still unclear for me.

       

      I do have an app with the right permissions, and Power BI tenant is configured to Allow service principals to use Power BI APIs (AD Group with Service Principal added).

       

      When I click on the try it button, where can I specified the ApplicationID ?

      As I said, today the API returns data, but without Group or Capacity expanded.

       

      Thank you for your help

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi lbeaudoin ,

         

        Are you able to get the Capacity and Groups expanded?

         

        you have confirmed on the PBI Tenant setting of API as enabled. Using "Try it" option in the browser you dont neet to pass application id.

        API call should be as below

        GET https://api.powerbi.com/v1.0/myorg/admin/capacities/{capacityId}/refreshables/{refreshableId}?$expand=capacity,group

         

         In the Try it now window, please check

         

        Parameters

        capacityid* <capid>

        refreshableid* <refid>

        $expand capacity,group (add $expand in name text box, capacity,group in value & click "+" button)

         

        Now click the Run button to get the 200 response.

         

        Please share error code in case you get any error.