API to Bulk Disable Portal Only Customer Users?

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
Micky Caritte Community Champion Dec 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

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}
Micky Caritte Community Champion Dec 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 Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,109 views 6 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot