Hi Team,
A new user will be added to stash/bitbucket using API and working perfectly. Through Ldap authentication we are using user management, and we need to remove users via Jira script runner.
Thanks in advance for your solution.
If you're using LDAP authentication with Bitbucket (Stash), user management like creation or removal should be handled directly through the LDAP directory not via Jira or Bitbucket APIs. These tools treat LDAP users as read-only.
That said, you can still remove or restrict user access using ScriptRunner in Jira by calling Bitbucket’s REST APIs. This can help you:
- Remove users from Bitbucket groups
- Revoke access to specific repositories or projects
- (For local Bitbucket users) disable or delete their accounts
This can all be automated through REST API calls using ScriptRunner's built-in HTTP request support.
However, if the user is LDAP-based, and you want to fully remove their access:
1. Disable or delete the user in the LDAP directory
2. Allow Bitbucket to pick up the change during the next directory sync
That’s the most reliable and recommended approach in LDAP-managed environments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.