Admin - Groups GetGroupsAsAdmin

Returns a list of workspaces for the organization.
Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
This API allows 200 requests per hour at maximum.

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

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

URI Parameters

Name In Required Type Description
$expand
query
  • string

Expands related entities inline, receives a comma-separated list of data types. Supported: users, reports, dashboards, datasets, dataflows

$filter
query
  • string

Filters the results based on a boolean condition

$top
query True
  • integer
int32

Returns only the first n results. This parameter is mandatory and must be in the range of 1-5000.

$skip
query
  • integer
int32

Skips the first n results. Use with top to fetch results beyond the first 5000.

Responses

Name Type Description
200 OK

OK

Examples

Get deleted workspaces (only applicable for workspaces in the new workspace experience)
Get orphaned workspaces (only applicable for workspaces in the new workspace experience)
Get workspaces with dashboards expanded
Get workspaces with datasets expanded
Get workspaces with datasets expanded (only applicable for workspaces in the new workspace experience)
Get workspaces with reports expanded
Get workspaces with users expanded (only applicable for workspaces in the new workspace experience)

Get deleted workspaces (only applicable for workspaces in the new workspace experience)

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$filter=state eq 'Deleted'&$top=100

Sample Response

{
  "value": [
    {
      "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "Sample Group 2",
      "description": "Deleted sample group",
      "type": "Workspace",
      "state": "Deleted"
    }
  ]
}

Get orphaned workspaces (only applicable for workspaces in the new workspace experience)

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=users&$filter=(not users/any()) or (not users/any(u: u/groupUserAccessRight eq Microsoft.PowerBI.ServiceContracts.Api.GroupUserAccessRight'Admin'))&$top=100

Sample Response

{
  "value": [
    {
      "id": "d5caa808-8c91-400a-911d-06af08dbcc31",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "Orphaned Group",
      "description": "Sample orphan group",
      "type": "Workspace",
      "state": "Active",
      "users": []
    }
  ]
}

Get workspaces with dashboards expanded

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=dashboards&$top=100

Sample Response

{
  "value": [
    {
      "id": "94E57E92-CEE2-486D-8CC8-218C97200579",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "capacityMigrationStatus": "Migrated",
      "description": "shorter description",
      "type": "Workspace",
      "state": "Removing",
      "name": "a",
      "dashboards": [
        {
          "id": "4668133c-ae3f-42fb-ad7c-214a8623280c",
          "displayName": "SQlAzure-Refresh.pbix",
          "isReadOnly": false
        },
        {
          "id": "a8f18ca7-63e8-4220-bc1c-f576ec180b98",
          "displayName": "cdvc",
          "isReadOnly": false
        }
      ]
    }
  ]
}

Get workspaces with datasets expanded

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=datasets&$top=100

Sample Response

{
  "value": [
    {
      "id": "94E57E92-CEE2-486D-8CC8-218C97200579",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "capacityMigrationStatus": "Migrated",
      "description": "shorter description",
      "type": "Workspace",
      "state": "Removing",
      "name": "a",
      "datasets": [
        {
          "id": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523",
          "name": "SQlAzure-Refresh",
          "addRowsAPIEnabled": false,
          "configuredBy": "admin@granularcontrols.ccsctp.net",
          "isRefreshable": true,
          "isEffectiveIdentityRequired": false,
          "isEffectiveIdentityRolesRequired": false,
          "isOnPremGatewayRequired": false,
          "targetStorageMode": "Abf"
        },
        {
          "id": "7d6a4f72-1906-4e08-a469-bd6bc1ab7b69",
          "name": "NESGames",
          "addRowsAPIEnabled": false,
          "configuredBy": "admin@granularcontrols.ccsctp.net",
          "isRefreshable": true,
          "isEffectiveIdentityRequired": false,
          "isEffectiveIdentityRolesRequired": false,
          "isOnPremGatewayRequired": false,
          "targetStorageMode": "Abf"
        }
      ]
    }
  ]
}

Get workspaces with datasets expanded (only applicable for workspaces in the new workspace experience)

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=datasets

Sample Response

{
  "value": [
    {
      "id": "e380d1d0-1fa6-460b-9a90-1a5c6b02414c",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "Sample Group 1",
      "description": "Sample group",
      "type": "Workspace",
      "state": "Active",
      "datasets": [
        {
          "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
          "name": "SalesMarketing",
          "addRowsAPIEnabled": false,
          "configuredBy": "john@contoso.com",
          "isRefreshable": true,
          "isEffectiveIdentityRequired": false,
          "isEffectiveIdentityRolesRequired": false,
          "isOnPremGatewayRequired": false,
          "encryption": {
            "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
            "encryptionStatus": "InSyncWithWorkspace"
          }
        }
      ]
    },
    {
      "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "Sample Group 2",
      "description": "Deleted sample group",
      "type": "Workspace",
      "state": "Deleted",
      "datasets": []
    }
  ]
}

Get workspaces with reports expanded

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=reports&$top=100

Sample Response

{
  "value": [
    {
      "id": "EC1EE11F-845D-495E-82A3-9DAC2072305A",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "capacityMigrationStatus": "Migrated",
      "description": "cvcv",
      "type": "Workspace",
      "state": "Active",
      "name": "WSv2Test12",
      "reports": []
    },
    {
      "id": "94E57E92-CEE2-486D-8CC8-218C97200579",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "capacityMigrationStatus": "Migrated",
      "description": "shorter description",
      "type": "Workspace",
      "state": "Removing",
      "name": "a",
      "reports": [
        {
          "id": "5DBA60B0-D9A7-42AE-B12C-6D9D51E7739A",
          "reportType": "PowerBIReport",
          "name": "SQlAzure-Refresh",
          "datasetId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523"
        },
        {
          "id": "197E5C3C-D2F3-42D8-A536-875FB6D7D48C",
          "reportType": "PowerBIReport",
          "name": "NESGames",
          "datasetId": "7d6a4f72-1906-4e08-a469-bd6bc1ab7b69"
        }
      ]
    }
  ]
}

Get workspaces with users expanded (only applicable for workspaces in the new workspace experience)

Sample Request

GET https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=users&$top=100

Sample Response

{
  "value": [
    {
      "id": "e380d1d0-1fa6-460b-9a90-1a5c6b02414c",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "Sample Group 1",
      "description": "Sample group",
      "type": "Workspace",
      "state": "Active",
      "users": [
        {
          "emailAddress": "john@contoso.com",
          "groupUserAccessRight": "Admin"
        }
      ]
    },
    {
      "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf",
      "isReadOnly": false,
      "isOnDedicatedCapacity": false,
      "name": "Sample Group 2",
      "description": "Deleted sample group",
      "type": "Workspace",
      "state": "Deleted",
      "users": []
    }
  ]
}

Definitions

Dashboard

A Power BI dashboard

Dataflow

The metadata of a dataflow

Dataset

A Power BI dataset

Encryption

Encryption information for a dataset

EncryptionStatus

Dataset encryption status

Group

A Power BI group

Groups

Odata response wrapper for a Power BI group list

GroupUser

A Power BI user access right entry for workspace

GroupUserAccessRight

Access rights user has for the workspace

PrincipalType

The principal type

Report

A Power BI report

Dashboard

A Power BI dashboard

Name Type Description
displayName
  • string

The dashboard display name

embedUrl
  • string

The dashboard embed url

id
  • string

The dashboard id

isReadOnly
  • boolean

Is ReadOnly dashboard

Dataflow

The metadata of a dataflow

Name Type Description
configuredBy
  • string

The dataflow owner

description
  • string

The dataflow description

modelUrl
  • string

A URL to the dataflow definition file (model.json)

name
  • string

The dataflow name

objectId
  • string

The dataflow id

Dataset

A Power BI dataset

Name Type Description
Encryption

The dataset encryption information (Only applicable when $expand is specified)

IsEffectiveIdentityRequired
  • boolean

Dataset requires effective identity

IsEffectiveIdentityRolesRequired
  • boolean

Dataset requires roles

IsOnPremGatewayRequired
  • boolean

Dataset requires an On-premises Data Gateway

IsRefreshable
  • boolean

Can this dataset be refreshed

addRowsAPIEnabled
  • boolean

Whether dataset allows adding new rows

configuredBy
  • string

The dataset owner

id
  • string

The dataset id

name
  • string

The dataset name

webUrl
  • string

The dataset web url

Encryption

Encryption information for a dataset

Name Type Description
EncryptionStatus

Dataset encryption status

EncryptionStatus

Dataset encryption status

Name Type Description
InSyncWithWorkspace
  • string

Encryption is supported and is in sync with the encryption settings

NotInSyncWithWorkspace
  • string

Encryption is supported and not in sync with the encryption settings

NotSupported
  • string

Encryption is not supported for this dataset

Unknown
  • string

Unable to determine state due to dataset corruption

Group

A Power BI group

Name Type Description
capacityId
  • string

The capacity id

dashboards

The dashboards that belong to the group. Available only for admin API calls.

dataflowStorageId
  • string

The Power BI dataflow storage account id

dataflows

The dataflows that belong to the group. Available only for admin API calls.

datasets

The datasets that belong to the group. Available only for admin API calls.

description
  • string

The group description. Available only for admin API calls.

id
  • string

The workspace id

isOnDedicatedCapacity
  • boolean

Is the group on dedicated capacity

isReadOnly
  • boolean

Is the group read only

name
  • string

The group name

reports

The reports that belong to the group. Available only for admin API calls.

state
  • string

The group state. Available only for admin API calls.

type
  • string

The type of group. Available only for admin API calls.

users

The users that belong to the group, and their access rights. Available only for admin API calls.

Groups

Odata response wrapper for a Power BI group list

Name Type Description
odata.context
  • string

OData context

value

The groups

GroupUser

A Power BI user access right entry for workspace

Name Type Description
displayName
  • string

Display name of the principal

emailAddress
  • string

Email address of the user

groupUserAccessRight

Access rights user has for the workspace

identifier
  • string

Identifier of the principal

principalType

The principal type

GroupUserAccessRight

Access rights user has for the workspace

Name Type Description
Admin
  • string

Grants administrator rights to workspace

Contributor
  • string

Grants read and write access to content in group

Member
  • string

Grants read access to content in workspace

None
  • string

Removes permission to content in workspace

PrincipalType

The principal type

Name Type Description
App
  • string

Service principal type

Group
  • string

Group principal type

User
  • string

User principal type

Report

A Power BI report

Name Type Description
datasetId
  • string

The dataset id

embedUrl
  • string

The report embed url

id
  • string

The report id

name
  • string

The report name

webUrl
  • string

The report web url