Hi!
I am trying to build a bulk user deprovision script for our Jira platform using the REST API and python.
The current manual process is for the Tech Support team to select 'Remove User' when on the user's profile in the admin Administrator settings (see below screenshot).
I have tried the API recommended here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-delete - but it doesn't seem to get a response from the server.
I also tried: https://developer.atlassian.com/cloud/admin/user-management/rest/api-group-users/#api-users-account-id-manage-lifecycle-disable-post but this may be depricated as I receive an auth issue.
Any ideas on the best API to use for removing site access in this way specifically?
Being able to remove users from the groups they are in would also be useful but the option here doesn'ty return any response from the cloud/server either: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-delete
I'm using Python so any advice in that langauge would be prefferred
Many thanks in advance!
Mike
Hi @Michael Savedra ,
based on the Atlassian Access Rest API doc, it seems that you are able to deactivate user through the following api https://developer.atlassian.com/cloud/admin/user-management/rest/api-group-users/#api-users-account-id-manage-lifecycle-disable-post
Could you try it?
Hope this helps,
Fabio
Hi @Fabio Racobaldo _Catworkx_ ,
Thanks for getting back.
This was the example that was giving me an authentication error. I thought this method may be depricated as the auth section is not in the same format as the usual REST API calls that specify "auth:" and require the JIRA account email and API token.
This only asks for the following: " headers = { "Content-Type": "application/json", "Authorization": "Bearer <access_token>" }"
Could you please specify how the auth details shoudl be formatted in this example?
Many thanks,
Michael
You need an API token first to use that API. Please take a look here https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/
So I have an API token already and this works for all other API calls.
For example when I need to return the accountID for a user I will use the following:
It looks like you're new here. Sign in or register to get started.