---
title: "GET /subscriptions/{subscriptionId}/resourcegroups"
method: GET
path: "/subscriptions/{subscriptionId}/resourcegroups"
tags: ["ResourceGroups"]
---

# GET /subscriptions/{subscriptionId}/resourcegroups

`GET /subscriptions/{subscriptionId}/resourcegroups`

Gets all the resource groups for a subscription.

## Path parameters

- `subscriptionId` string, required

## Query parameters

- `$filter` string
- `$top` integer
- `api-version` string, required

## Response `200`

OK - Returns an array of resource groups.

- ResourceGroupListResult — List of resource groups.
  - `value` ResourceGroup[] — An array of resource groups.
    - `id` string — The ID of the resource group.
    - `name` string — The name of the resource group.
    - `type` string — The type of the resource group.
    - `properties` ResourceGroupProperties — The resource group properties.
      - `provisioningState` string — The provisioning state.
    - `location` string, required — The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
    - `managedBy` string — The ID of the resource that manages this resource group.
    - `tags` object — The tags attached to the resource group.
  - `nextLink` string — The URL to use for getting the next set of results.

## Other responses

- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.dev/azure/apis/resourcemanagementclient.md) · [All operations](https://skmtc.dev/azure/apis/resourcemanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/resourcemanagementclient/revisions/917e67faecf0/schema)
