Hi,
I am having an issue with User API for Jira Cloud.
1. We successfully executed it to create a User, but when we try to add it to a group it returns the following error:
Message : {"errorMessages":["Specified user does not exist or you do not have required permissions"]
Is there any other way to automatically add new users to a group that doesn't grant Product access, but is used for Portal access so that these users can raise requests?
2. Also is there a way to disable the invite notification when new user has been created, as it is pointless to us and only adds to spam and customer confusion as we are granting them access automatically through the API.
Thanks.
Kind Regards,
Alex
Hi @VACH SITC
There are two things you have to take note of:
* Jira users created via the API, if the default product access is turned on, the default group will be assigned if the default is "jira-software-users" that will give them application access.
* The Portal access depends on your settings on the Jira Service Desk project, if it allows any customer to create their own account. Also know that Portal only Customer (Jira ServiceDesk customer account) is different from a Jira user account and Portal only customer account can't be added to any Jira group
Having those in mind, then you should be able to use this endpoint "/rest/api/3/user" to basically create a user (having the default product access off), that user wouldn't be added to any default group that is there, then you can use the Add user to group endpoint "/rest/api/3/group/user" to add those users to a group that you need. Then with your settings on your Service Desk Project, your users should be able to access it. Please note in this situation, these users are not Portal only customers but Jira users without an application access (No License count is used)
Also, using the above user API by default has the notification set to false which the user shouldn't get an invite. I believe the reason they might get the notification is due to the Application access being granted.
Coming to your error, it seems that when you're trying to Add a user to a group, you are either not specifying the AccountId in your request. You might also want to look at this discussion i wrote on a Project i've worked on that does user creation to see if it helps with your use case.
Thank you for the suggestion, we will look into it.
And do you have any insight on how to stop the invitation mails sent when creating a user through API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It shouldn't send the notification in the first place as the default is false, even if you pass it as a parameter in the request body it doesn't work. I don't think that API is particularly working well for the notification part. There's a report ACJIRA-1818 by the Atlassian team, something I think you could watch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.