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 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

786 views 5 7
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