/admin-scripts

Leverage scripts with the Bitwarden CLI to automate admin tasks

Primary LanguagePython

Welcome to the Admin Scripts Repo!

Here you will find a variety of Bash, Powershell and Python script examples that can be utilized as a jumping off point for creating your own automation scripts to be used with the Bitwarden CLI and/or APIs.

Important things to note:

  • Admin Scripts are currently divided into separate folders by type: API Scripts, Bash, Powershell, and Python
  • Admin scripts are meant to act as examples. They are not written in a way that can be run as is and so will require at least some modifications/insertions
  • Most scripts contain commented instructions, so please read through thoroughly/carefully

Additional documenation to help you get started:
Password Manager CLI Guide
Vault Management API Reference
Bitwarden Public API Reference
Guide to using Postman to access the Bitwarden API
Guide for using the Vault Management API in Python

Commonly Used Scripts Examples

Collection Permission Inheritance

Inherit Parent Permissions (CLI/Bash)

Confirm Accepted Users

Password Manager: Confirm All Accepted Users (CLI/Bash)
Password Manager: Confirm All Accepted Users (CLI/Powershell)
Password Manager: Confirm All Accepted Users (API/Powershell)
Password Manager: Confirm All Accepted Users with Password (CLI/Bash)
Secrets Manager: Confirmed All Accepted Users (CLI/Bash)
Secrets Manager: Confirmed All Accepted Users (CLI/Powershell)

List Organization Members

List All Organization Members (CLI/Bash)
List All Organization Members (CLI/Powershell)
List ALl Organization Members w/ 2FA Check (CLI/Powershell)

Disclaimer

Please note that the projects in Bitwarden Labs are experimental and not officially supported by Bitwarden. They are provided "as is" with no guarantees.