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:

1{
2 "enabled":true,
3 "id":"64ba4d726c1c2406577e6582",
4 "pending":true,
5 "secret":{
6 "expires":-1,
7 "plain":"ehfFEGCQXK"
8 },
9 "emails":[
10 {
11 "value":"max.mustermann@staffbase.com",
12 "primary":true,
13 "providerID":"staffbase"
14 }
15 ],
16 "status":"pending",
17 "verificationCode":{
18 "mail":"max.mustermann@staffbase.com",
19 "value":"ehfFEGCQXK"
20 }
21}

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.