Azure Plugin

Rotate Azure AD account passwords

Keeper has launched a new Password Rotation feature with Keeper Secrets Manager. This new capability is recommended for all password rotation use cases. The Documentation is linked below:

This plugin generates/rotates Azure AD password for any user.


pip install msal

Configure Azure Application to have User Administrative Privileges

Configure Azure Application for Rotation

Follow these steps as one-time setup for Azure rotation

Steps to register new application

  1. Navigate to new app registration page:

    Azure portal -> Azure Active Directory -> App Registrations -> New Registration

  2. Give a name to the application and leave Supported account type as "Accounts in this organizational directory only (Default Directory only - Single tenant)"

  3. Click "Register"

Steps to add role to the application

  1. Navigate to Roles and Administrators page:

    Azure portal -> Azure Active Directory -> Roles and administrators

  2. Search for Helpdesk Administrator role and click on it

  3. Click on + Add assignments

  4. Search for the application that was created above, select it, and click on "Add"

Create App Secret

  1. Navigate to Certificates & Secrets:

    Azure portal -> Azure Active Directory -> App Registrations -> Select app that was created above -> Certificates & secrets

  2. Under "Client secrets" click on + New client secret

  3. Give description to a secret and click "Add"

  4. Make sure to copy "Value" of the secret

Prepare Records for Rotation

Create a Record for Rotation

Rotation supports legacy and typed records. If using typed record, a 'Login' type field is required. Additional fields may be added depending on the rotation type as well. See the instructions below.

See the Troubleshooting section for more information on legacy vs typed records

Set the Azure Login Name

Populate the 'Login' field of the Keeper record with the Azure login name

Add Required Fields

The following fields are required for Azure AD rotation. Create each field with the label indicated and supply the required information.



Displayed upon Registration of a new application (under Azure portal -> Azure Active Directory -> App Registrations -> New Registration.


Azure portal -> Azure Active Directory -> App Registrations -> [App name] -> Application (client) ID


Azure portal -> Azure Active Directory -> App Registrations -> [App name] -> Directory (tenant) ID


Optional. Azure Cloud. There are 4 physical Azure cloud locations 1. Global. Default location. Omit this property. 2. China 3. German 4. USGov

For an easier time creating new Azure rotation records, create a custom record type with theses text type fields defined

Additional Rotation Settings

The following values can customize rotation parameters. Add these options to a record as text fields and set the label to correspond to the parameter as shown in the table.




(Optional) Tells Commander to use Azure AD Key rotation. This should be either set to the record, or supplied to the rotation command



To rotate Azure passwords, use the rotate command in Commander. Pass the command a record title or UID (or use --match with a regular expression to rotate several records at once)

rotate "My Azure Credentials" --plugin azureadpwd

The plugin can be supplied to the command as shown here, or added to a record field (see options above). Adding the plugin type to the record makes it possible to rotate several records at once with different plugins.


After rotation is completed, the new password will be stored in the Password field of the record

Last updated