Hi all!
I'm tying to create a new user with api v3 (/rest/api/3/user) without any group.
When a make a POST request, a new user is created normally, but he is created with jira-software-users group
My Default Access Groups config is correct:
And when I create a new user via UI, this does not happen.
That's my code:
def create_jira_user(email, fullname):
url = "https://mycompany.atlassian.net/rest/api/3/user"
payload = json.dumps({
"emailAddress": email,
"displayName": fullname
})
response = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=get_jira_authorization()
)
print(json.loads(response.text))
Searching on API (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-post). I can send some Additional Properties, but didn't find any sample to help me.
Am I doing something wrong? Is there a way to send some Additional Properties that new user is created without or a specific group (that does not have some product access).
Thanks!
Welcome to Community! with your code, this shouldn't add the user into any group, given that you've disabled the default access group for "jira-software-users" under Product access. Do you have Atlassian access subscription on your organization? it could explain why the default group keeps getting added.
Thanks for your fast response :]
No, we don't have Atlassian Access subscription :/
Do you know the diference between create an user via API or via UI? Or and an example how can I send Additional Properties via API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Additional properties is referring to this endpoint if any has been created on your Instance. I have a Free Addon I created, it basically uses REST API simple structures, you can also view the codes on Github to see how I implemented it. you can give it a go and see if it works as expected for you. As far as I know that should just work except something wrong is going on which isn't shown on your codes here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Prince Nyeche !
Thank you very much for your support!
I've tried everything, without success :/
I solved this issue checking and removing all default groups that were assigned to the new created user, via API.
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.