Removing access to service desk via API

Is there way to use the Service Desk API to remove 'Customers' from a specific service desk so they can't see the tickets in that service desk anymore ?

Or to disable their access to Service Desk altogether so they can't login at all ?

2 answers

1 accepted

0 vote
Steve King Atlassian Team Apr 14, 2018

Hi @Wim Godden

If you want to delete a users access to Jira Service Desk, you can do so via the "Remove User from Application" API endpoint documented here. This is an experimental feature. To do so you'll just need to pass their username to the API with your admin credentials or your OAuth tokens, but here's a quick example:

curl -X "DELETE" "https://my.jira.host/rest/api/2/user/application?username=deleteThisUsersAccess&applicationKey=jira-servicedesk" \
     -u 'charlie:***** Hidden credentials *****'


The applicationKey you want to use for this operation is "jira-servicedesk". Note, once you do this the user will no longer have access to any Jira Service Desk features.

I've also included a quick postman JSON for you below:

{
  "info": {
    "name": "Delet a specific user from JSD",
    "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
    "version": "v0.0.0"
  },

  "item": [
    {
      "name": "Application Permissions",
      "item": [
        {
          "name": "Delete user access to JSD",
          "request": {
            "url": "https://my.jira.host/rest/api/2/user/application?applicationKey=jira-servicedesk&username=deleteThisUserFromJSD",
            "auth": {
              "type": "basic"
            },
            "method": "DELETE"
          }
        }
      ]
    }
  ]
}
0 vote

You can always disable a customer account using the user management section of JIRA. 

Or you could make sure that the service desk is configured to only allow people in that are specifically listed within that project. Once you've done that, you can just remove them from that list. This would only keep them from your project.

I need to specifically do it through the API. I see no way to do that at this point.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Mar 09, 2018 in Jira Service Desk

E.L. Fridge's take on education, Jira Service Desk, and creative Jira use cases

...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...

1,239 views 2 14
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