User Properties Migration Guide

Migrate from the old to the new user properties

Employee App
Front Door Intranet

Staffbase constantly improves its platform and features to maximize value for its users. As a part of such an improvement, Staffbase has introduced changes to its user model to make it less complex and easier to understand. Staffbase will soon replace some existing user properties with new ones.

The following properties will be removed:

  • From the request payload:
    • enabled
  • From the response payload:
    • enabled
    • pending
    • verificationCode
Staffbase recommends migrating to the new user properties if you use the old user properties. To learn more, reach out to your Customer Success Manager.

Currently, the user object contains, among others, the following properties:

{
"enabled":true,
"id":"64ba4d726c1c2406577e6582",
"pending":true,
"secret":{
"expires":-1,
"plain":"ehfFEGCQXK"
},
"emails":[
{
"value":"max.mustermann@staffbase.com",
"primary":true,
"providerID":"staffbase"
}
],
"status":"pending",
"verificationCode":{
"mail":"max.mustermann@staffbase.com",
"value":"ehfFEGCQXK"
}
}

With the removal of the properties enabled and pending from the response payload you can use the property status to get the user’s current status on the platform.

Old PropertiesNew Properties
apiResponse.enabled && apiResponse.pendingapiResponse.status=pending
apiResponse.enabled && !apiResponse.pendingapiResponse.status=activated
!apiResponse.enabled && !apiResponse.pendingapiResponse.status=deactivated

With the removal of the property verificationCode from the response payload, you can use the properties secret and emails to get the necessary information.

Old PropertiesNew Properties
apiResponse.verificationCode.mailapiResponse.emails[primary=true].value
apiResponse.verificationCode.valueapiResponse.secret.plain

With the removal of the property enabled from the request payload you can use the property status to reactivate or deactivate a user in the platform. Currently, to deactivate a user, you would send a PUT request with {"enabled": false}. The new approach to deactivate a user is to send a PUT request with {"status": "deactivated"}. For more information, see the offboarding guide.