How to give site admin permission to my forge App?

I tried to call “Add user to group” API in my UI kit app.

const productAuthHeader = {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'X-Force-Accept-Language': 'true',
    'Accept-Language': 'en'
}

const res = await api.asApp().requestJira(route`/rest/api/3/group/user?groupId=${groupId}`, {
        method: 'POST',
        headers: productAuthHeader,
        body: `{
            "accountId": "${accountId}"
        }`
});

console.log(await res.json());

And, I got this error in the response.

{ "errorMessages": [ "You are not authorized to perform this action. Administrator privileges are required." ], "errors": {} }

The document says the API requires Site administration permission.
How to do that ?
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post

Here is the permissions in manifest.

permissions:
  scopes:
    - manage:servicedesk-customer
    - read:jira-user
    - read:jira-work
    - write:jira-work
    - read:application-role:jira
    - read:group:jira
    - read:user:jira
    - read:avatar:jira
    - manage:jira-project
    - manage:jira-configuration
    - read:user-configuration:jira
    - write:user-configuration:jira
    - delete:user-configuration:jira
    - read:user.property:jira
    - write:user.property:jira
    - delete:user.property:jira
    - storage:app
    - write:group:jira
1 Like

Hey , i m facing the same issue. Did you manage to make it work ?