Sharing Jira filter with a user group via API fails with error "You do not have permission to share with Group"
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Sharing Jira filter with a user group via API fails with the error You do not have permission to share with the Group
API to share filter permission: Add share permission
API endpoint: https://<yoursitename>.atlassian.net/rest/api/3/filter/<filterID>/permission
POST /rest/api/3/filter/{id}/permission
Body:
{
"groupname": "jira-administrators",
"rights": 1,
"type": "group"
}
Error message:
Environment
Jira Service Management Cloud
Diagnosis
When referring to the Add share permission page for the errors on APIs, a 400 error is returned when:
- the request object is invalid. For example, it contains an invalid type, the ID does not match the type, or the project or group is not found.
- the user does not own the filter.
- the user does not have the required permissions.
If the error presents itself even after checking all the possibilities above, refer to this article for a solution.
Cause
The user who is executing this API is not added to the group.
Solution
Add the impacted user to the user group and re-execute the API request.
The details about sharing filter via UI is documented in Share a filter
To add users to a group, refer to the Add users page or follow the below steps:
- Go to admin.atlassian.com. Select your organization if you have more than one.
- Select Directory > Groups.
- Select the group that you want to add the user to.
- Select Add group members and search for the user/s you want to add.
- Select Add users.
A permanent solution will be in place when the below open feature is implemented:
Please vote for it by clicking on Vote for this issue and add yourself as a watcher by clicking on Start watching this issue to get the latest updates about it.
Contact Atlassian support if you have any questions.