API to Bulk Disable Portal Only Customer Users?

Jennie Juneau December 15, 2017

I have some Jira Service Desk "portal only customer" accounts which I would like to disable using the API. 

I tried the same curl commands I use to disable regular users, but get a message that the users cannot be found. 

Is there a way to use API to disable Portal Only Customer accounts? I found one article here saying this was coming soon (in 2013), but the text was crossed-out for everything related to the Customer Portal.

I am not wanting to disable the organizations or the portal itself, just needing to clean up some of the users.

 

Any help would be much appreciated!

1 answer

0 votes
miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 15, 2017

Hi Jennie,

I guess using Jira's API (not Service desk) should work as customers (portal only users) are users with no licenses for applications but still are users.

What endpoint did you try, could you give some details?

Thanks

Jennie Juneau December 15, 2017

Hi Micky, 

Thanks for the response. I'm not really sure what you mean by which endpoint. 

I used a script that works fine for disabling other users: Software, Service Desk, and Confluence. Those users all show up for me on the site under ${JIRA_URL}/admin/users/view?username=${NAME}

But the Customer Portal Only users show up under a different area of the admin console: 

${JIRA_URL}/admin/jira-service-desk/portal-only-customers/view?username=${NAME}

I think this is the problem.

I'm using curl with the following address successfully for non portal only accounts:

${JIRA_URL}/admin/rest/um/1/user/deactivate?username=${NAME}
miikhy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 15, 2017

Hi Jennie,

Seems like you're not using a public REST API. You should have a look at https://docs.atlassian.com/jira/REST/server/ to use the officially supported and public REST endpoint to delete users (can be done through curl). That being said, if you want to deactivate user, public API does not support it yet (https://jira.atlassian.com/browse/JRASERVER-44801).

I'm not sure I can help further on that non standard use :(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events