Function: addUserToGroup()
function addUserToGroup(
client,
parameters,
options?
): Promise<void>;Defined in: src/admin/api/groups.ts:153
Add a user to a group. This gives the user the same app access and permissions as the group. The user must be in the same directory as the group.
Note: Adding a user to the org-admins group through this API no longer grants organization admin access. To assign organization admin access, use the Assign organization-level role endpoint instead. This change applies to all organizations. For more information, see this community post.
You can’t add a user to a group synced from an identity provider. Manage this group in your identity provider instead.
You can’t add a user to a group if you’ve exceeded your user limit for an app that the group grants access to. Increase your user limit or suspend another user from the app first.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { accountId: string; directoryId: string; groupId: string; orgId: string; } | - |
parameters.accountId | string | Every user has a unique ID. Find a user’s account ID by using the Get users endpoint. |
parameters.directoryId? | string | A directory has a unique ID. Use the Get directories endpoint to find the directory ID. |
parameters.groupId? | string | A group has a unique ID. Use the Get groups endpoint to find the group ID. |
parameters.orgId? | string | Your organization has a unique ID. Find this ID in your Atlassian Administration URL or when you create your API key. |
options? | RequestOptions | - |
Returns
Promise<void>