Bulk Password Reset

Resets a list of users SIP passwords, Voicemail passcodes, or Web Authentication Password. Specifify in password_type with the options of SIP = 'SIP', Voicemail = 'VM', or Web = "WEB" and the script will perform the necessary actions.

The script makes use of the following methods:

api.password_generate.get_passwords_generate()
api.authentication.put_user_authentication_service()
api.password_generate.get_passcodes_generate()
api.authentication.put_user_portal_passcode()
api.password_generate.get_passwords_generate()
api.session.put_user_web_authentication_password()

Parameters

  • service_provider_id (str): Service Provider ID where group is hosted.

  • group_id (str): Group ID where target users are located.

  • users (list): List of User IDs of the target users to reset the password.

  • password_type (str): Type of password to reset either 'SIP', 'VM', or 'WEB'. Only accepts these two options.

Raises:

  • OSInvalidPasswordType: Only valid password options are SIP, VM, WEB. If another is requested this will be raised.

Return

  • dict: Returns dictionary containing user ID and new password set.

How To Use:

This method requires keyword arguments i.e. group_id="group_id"

assistant = Scripter(my_api)

users = [
    "[email protected]",
    "[email protected]",
    "[email protected]"
]

# changes SIP password for users
assistant.bulk_password_reset(
        service_provider_id="ServiceProviderID",
        group_id="GroupID",
        users=users,
        password_type="SIP"   
    )
    
# changes Voicemail passcode for users
assistant.bulk_password_reset(
        service_provider_id="ServiceProviderID",
        group_id="GroupID",
        users=users,
        password_type="VM"   
    )
    
# changes Web Authentication password for users
assistant.bulk_password_reset(
        service_provider_id="ServiceProviderID",
        group_id="GroupID",
        users=users,
        password_type="WEB"   
    )

Example Returned Data of SIP Passwords (Formatted)

[
   {
      "userId":"[email protected]",
      "newPassword":"3h1U[-"
   },
   {
      "userId":"[email protected]",
      "newPassword":"e^Bv4c"
   },
   {
      "userId":"[email protected]",
      "newPassword":"4WK#:y"
   }
   {
      "userId":"[email protected]",
      "newPassword":"3h1U[-"
   },
   {
      "userId":"[email protected]",
      "newPassword":"e^Bv4c"
   },
   {
      "userId":"[email protected]",
      "newPassword":"4WK#:y"
   }
]

Last updated

Was this helpful?