Groups - Get Groups

Returns a list of workspaces the user has access to.

Permissions

This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.

Required Scope

Workspace.Read.All or Workspace.ReadWrite.All

Limitations

  • User permissions for workspaces take time to get updated and may not be immediately available when using API calls. To refresh user permissions, use the Refresh User Permissions API call.

GET https://api.powerbi.com/v1.0/myorg/groups
GET https://api.powerbi.com/v1.0/myorg/groups?$filter={$filter}&$top={$top}&$skip={$skip}

URI Parameters

Name In Required Type Description
$filter
query

string

Returns a subset of a results based on Odata filter query parameter condition.

$skip
query

integer

int32

Skips the first n results

$top
query

integer

int32

Returns only the first n results

Responses

Name Type Description
200 OK

Groups

OK

Examples

Example
Get a list of workspaces using a filter example

Example

Sample request

GET https://api.powerbi.com/v1.0/myorg/groups

Sample response

{
  "value": [
    {
      "id": "f089354e-8366-4e18-aea3-4cb4a3a50b48",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "sample group"
    },
    {
      "id": "3d9b93c6-7b6d-4801-a491-1738910904fd",
      "isReadOnly": false,
      "isOnDedicatedCapacity": true,
      "capacityId": "0f084df7-c13d-451b-af5f-ed0c466403b2",
      "defaultDatasetStorageFormat": "Small",
      "name": "marketing group"
    },
    {
      "id": "a2f89923-421a-464e-bf4c-25eab39bb09f",
      "isReadOnly": false,
      "isOnDedicatedCapacity": true,
      "capacityId": "0f084df7-c13d-451b-af5f-ed0c466403b2",
      "defaultDatasetStorageFormat": "Large",
      "name": "contoso",
      "dataflowStorageId": "d692ae06-708c-485e-9987-06ff0fbdbb1f"
    }
  ]
}

Get a list of workspaces using a filter example

Sample request

GET https://api.powerbi.com/v1.0/myorg/groups?$filter=contains(name,'marketing')%20or%20name%20eq%20'contoso'

Sample response

{
  "value": [
    {
      "id": "3d9b93c6-7b6d-4801-a491-1738910904fd",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "marketing group"
    },
    {
      "id": "a2f89923-421a-464e-bf4c-25eab39bb09f",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "contoso",
      "dataflowStorageId": "d692ae06-708c-485e-9987-06ff0fbdbb1f"
    }
  ]
}

Definitions

Name Description
AzureResource

A response detailing a user-owned Azure resource such as a Log Analytics workspace.

DefaultDatasetStorageFormat

The default dataset storage format in the group

Group

A Power BI group

Groups

The OData response wrapper for a list of Power BI groups

AzureResource

A response detailing a user-owned Azure resource such as a Log Analytics workspace.

Name Type Description
id

string

An identifier for the resource within Power BI.

resourceGroup

string

The resource group within the subscription where the resource resides.

resourceName

string

The name of the resource.

subscriptionId

string

The Azure subscription where the resource resides.

DefaultDatasetStorageFormat

The default dataset storage format in the group

Name Type Description
Large

string

Large dataset storage format

Small

string

Small dataset storage format

Group

A Power BI group

Name Type Description
capacityId

string

The capacity ID

dataflowStorageId

string

The Power BI dataflow storage account ID

defaultDatasetStorageFormat

DefaultDatasetStorageFormat

The default dataset storage format in the workspace. Returned only when isOnDedicatedCapacity is true

id

string

The workspace ID

isOnDedicatedCapacity

boolean

Whether the group is assigned to a dedicated capacity

isReadOnly

boolean

Whether the group is read-only

logAnalyticsWorkspace

AzureResource

The Log Analytics workspace assigned to the group. This is returned only when retrieving a single group.

name

string

The group name

Groups

The OData response wrapper for a list of Power BI groups

Name Type Description
odata.context

string

OData context

value

Group[]

The list of groups