How to use API to reset NSX Manager Local Account Password
search cancel

How to use API to reset NSX Manager Local Account Password

book

Article ID: 416378

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

This article provides information on how to update and reset the password for NSX Local Account Password by API per specific request

Environment

VMware NSX

Resolution

A: To update the password, the old password is required

Step 1: Get userid

GET https://nsx-manager/api/v1/node/users

Step 2: PUT to update the password, the old password and userid (from Step 1) are required, and then user can login directly with new password

PUT https://nsx-manager/api/v1/node/users/userid_xxxx

Body from Step 1 and add the red lines

{
            "full_name": "Guest User1",
            "last_password_change": 0,
            "password_change_frequency": 90,
            "password_change_warning": 7,
            "password_reset_required": false,
            "status": "ACTIVE",
            "userid": userid_xxxx,
            "username": "username-AAAA",
            "old_password": "old_password",
            "password": "new_password"
        }

 

B: To reset the password, the old password is not required

After password reset, the user will be prompted to reset password again when firstly login with the reset password

POST https://nsx-manager/api/v1/node/users/userid_xxxx?action=reset_password

{"password": "reset_password"}

 

Additional Information

https://developer.broadcom.com/xapis/nsx-t-data-center-rest-api/latest/method_UpdateNodeUser.html

https://developer.broadcom.com/xapis/nsx-t-data-center-rest-api/latest/method_ResetNodeUserPassword.html