Add New Users via LastPass API
Use this API for creating LastPass accounts for new users.
Remember: All new users added via the LastPass API have the default password iterations value of 600,000 rounds. If desired and/or if permitted via policy, users can increase their password iterations value within their Account Settings. Learn more about password iterations.
API command
batchadd
Additional details
The 'username' field is required while the 'fullname', 'groups', 'duousername', 'securidusername', 'password' and 'password_reset_required' fields are optional. By setting the 'password' field you can define a default password for the new user that could be temporary or permanent based on the 'password_reset_required' field's value (default: true). To utilize this function, POST a JSON object similar to the example below.
Request sample
{
"cid": 12103061,
"provhash": "<Your API Secret>",
"cmd": "batchadd",
"data": [
{
"username": "user0@lastpass.com"
},
{
"username": "user1@lastpass.com",
"fullname": "John Doe"
},
{
"username": "user2@lastpass.com",
"fullname": "Mark Hunter",
"groups": [
"Group1",
"Group2",
"Group3"
],
"attribs": {
"objectGUID": "d3b07384d113edec49eaa6238ad5ff00",
"Department": "Finance",
"EmployeeNumber": "192832"
}
},
{
"username": "user3@lastpass.com",
"fullname": "John Smith",
"password": "DefaultPassword"
},
{
"username": "user4@lastpass.com",
"fullname": "Jane Smith",
"password": "DefaultPassword",
"password_reset_required": false
}
]
}
Response sample
{
"status": "OK"
}