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 Sign up to answer
Community showcase
Posted Friday in Jira Service Desk

Looking for anyone who has switched from Zendesk to Jira Service Desk

Hi Community! The Jira Service Desk marketing team is looking for customers who have successfully switched from Zendesk to Jira Service Desk!   We’d love to hear your thoughts on the pros and ...

117 views 7 3
Join discussion

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