> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Group leaders

With the **Group leader** role, users can request access, optionally timebound, on behalf of a group. The group leader role can allow you to set up groups that map to temporary cross-functional internal projects, especially when used in tandem with other group features, such as nested groups.

## Group leaders

A user with the **Group leader** role can request access to a resource on behalf of a group, add and remove users to a group, and remove access to items for a group.

To assign a group leader to a group, go to the resource detail page and select the edit icon. Next, check the box enabling group leaders and select user(s) to assign leaders.

<img src="https://mintcdn.com/opalsecurity/lt0M-hBs5yNe5ff5/images/docs/a35f0a2-Screenshot_2024-07-16_at_2.52.30_PM.png?fit=max&auto=format&n=lt0M-hBs5yNe5ff5&q=85&s=1548d0641e9c3423ede7373ddb48100f" alt="" width="1578" height="262" data-path="images/docs/a35f0a2-Screenshot_2024-07-16_at_2.52.30_PM.png" />

To request a resource for a group, a group leader can request access to a resource as usual, and choose the group to request on behalf of from the dropdown list.

<img src="https://mintcdn.com/opalsecurity/odnvD_MsXBxTor9u/images/docs/8e55a88-Screenshot_2024-07-16_at_2.54.59_PM.png?fit=max&auto=format&n=odnvD_MsXBxTor9u&q=85&s=fd4881af8e4756e045bcae8e6728abf5" alt="" width="710" height="796" data-path="images/docs/8e55a88-Screenshot_2024-07-16_at_2.54.59_PM.png" />

To add or remove users from a group, go to the group detail page, select the **User Access** tab, and select the users to add or remove. Alternatively, select the users you want to add with the **+ Add Users** button.

<img src="https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/1628549-Screenshot_2024-07-16_at_2.56.50_PM.png?fit=max&auto=format&n=TlQj9FwRe9HHNEYB&q=85&s=d4670cb2d9560dd3160161fddd7fb925" alt="" width="2506" height="742" data-path="images/docs/1628549-Screenshot_2024-07-16_at_2.56.50_PM.png" />

<img src="https://mintcdn.com/opalsecurity/odnvD_MsXBxTor9u/images/docs/741d430-Screenshot_2024-07-16_at_2.56.59_PM.png?fit=max&auto=format&n=odnvD_MsXBxTor9u&q=85&s=feff2e5fdc029eeb155dcc17d883cb23" alt="" width="2600" height="614" data-path="images/docs/741d430-Screenshot_2024-07-16_at_2.56.59_PM.png" />

## JIT access for group projects

After access to an item on behalf of a group has been requested and approved, the item shows on the group detail page under the **Resources** tab. Items in the **Resources** tab show the expiration date of the item, or indefinite if the access to the resource is not timebound.

<img src="https://mintcdn.com/opalsecurity/4Xj9diJ3E3kX-9Xd/images/docs/ee7b1a0-Screenshot_2024-07-16_at_2.56.23_PM.png?fit=max&auto=format&n=4Xj9diJ3E3kX-9Xd&q=85&s=2316309b07119da9cac229b54eb6f8c9" alt="" width="2568" height="362" data-path="images/docs/ee7b1a0-Screenshot_2024-07-16_at_2.56.23_PM.png" />

## Revoke access from groups

Group leaders can revoke user access to a group or group access to an item at any time by removing the user or item in from the **User Access** and **Resources** tabs, respectively, on a group detail page.

Select **Remove** from the **User Access** page to revoke user access.

<img src="https://mintcdn.com/opalsecurity/KunPWigry5GIeB5g/images/docs/48fc28c5674d5d5a6acf076387abca983c0b57219398e6e42fde1ca30faac320-remove-users-from-group.png?fit=max&auto=format&n=KunPWigry5GIeB5g&q=85&s=2145ea8b9c216f84a88730dfe7eeb1ed" alt="" width="3048" height="1148" data-path="images/docs/48fc28c5674d5d5a6acf076387abca983c0b57219398e6e42fde1ca30faac320-remove-users-from-group.png" />

Select **Remove** from the **Resources** tab to remove the resource.

<img src="https://mintcdn.com/opalsecurity/lwwIeFbsleftxaXx/images/docs/c1a10a4-Screenshot_2024-07-16_at_2.56.59_PM.png?fit=max&auto=format&n=lwwIeFbsleftxaXx&q=85&s=10050c1e044d5f70cee915a7a9920ab1" alt="" width="2600" height="614" data-path="images/docs/c1a10a4-Screenshot_2024-07-16_at_2.56.59_PM.png" />

## API endpoints

For group projects, you can use Opal's API to retrieve the user ID of group leaders, add a group leader to a group, and make a request by a group leader on behalf of the group.

* To get a group leader, use [GET /groups](/reference/getgroups)
* To add a group leader, use [PUT /groups](/reference/updategroups)
* To make a request, use [POST /requests](/reference/createrequest)

***
