---
title: "Fetch resource group ID by name"
method: GET
path: "/restapi/json/v1/resourcegroup/getResourceGroupId"
tags: ["Resource Groups"]
---

# Fetch resource group ID by name

`GET /restapi/json/v1/resourcegroup/getResourceGroupId`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/restapi/json/v1/resourcegroup/getResourceGroupId`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/restapi/json/v1/resourcegroup/getResourceGroupId/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the ID of a resource group based on its name and the user ID.

## Query parameters

- `RESOURCEGROUPNAME` string, required
- `USERID` integer, required

## Headers

- `orgName` string

## Response `200`

Resource group ID

- ResourceGroupIdResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `Details` object
      - `RESOURCEGROUPID` string
    - `name` string

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
