Hi,
I am trying to create a group using Jira Rest API, with APP INSTALLED EVENT.
While creating the group, api return you don't have site admin access error.
But I have Organisation Admin access. Do I need site admin role to create group in jira using rest api?
As you're using Centralized User Management, I don't believe you can or should use the default Jira REST API's for this.
Can you try using the Org Admin REST APIs instead? See here: https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-directory-groups-post
Keep in mind that you'll need an API Key (and not your Jira API Token) to authenticate. See this page for more information: https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/
Please let me know if this helps!
@Hans Polder _Devoteam_
Thanks for your response.
GET API for groups working for me with the default REST API's.
I could not create group only. And the same API is working inside the APP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just re-read your other comment and do see now that you got it to work via the page in the App. In that case I would say that you should evaluate the differences between your setup and the Apps' setup to figure this out. I don't have relevant experience to share here, sorry :).
I would for sure try tinkering with the Org Admin API anyway since that should offer you other integrations as well for any future use cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @nagaraj_deva ,
Could you please let me know which user management experience you are using? Original user management OR Centralized user management? Here how to check: Create groups | Atlassian Support
If you are using Original User Management, you must be in a site-admin group/role to create the group using REST API.
You can also check this doc: The Jira Cloud platform REST API (atlassian.com) to know more about the operation permissions in REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Monika Rani
Thanks for your response. I am Centralized User Management.
And FYI, I am able to view all groups, which I have in my organization.
Here is my scopes :
INFO 20:13:29.843 e89812d1-89f9-11ac-b898-befdab10268a {"errorMessages":["An error occurred: com.atlassian.idp.client.exceptions.AuthorizationException: {\"key\":\"forbidden\",\"context\":{\"message\":\"Not admin\"}}"],"errors":{}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@nagaraj_deva I would suggest you recheck the access because this error is clearly saying that the account you are using doesn't have admin access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Monika Rani
Thanks for your response.
As I said earlier, I have ORG-ADMIN role.
My doubt is, do we need SITE-ADMIN as well to create group.
And I'm able to create group, if I call the create group REST API from the app.
i.e. after running the app, I have page to create group. From that page I could create the GROUP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.