-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When updating a user I found out by trying to update user.customAttributes with more than one attribute, we need to either:
- Make n+ sdk calls:
await Promise.all([
descopeClient.management.user.updateCustomAttribute(loginId, 'param1', 'PRO'),
descopeClient.management.user.updateCustomAttribute(loginId, 'param2', 1689018774081),
descopeClient.management.user.updateCustomAttribute(loginId, 'param3', 'xxxxx'),
])
or
2. Load user attributes and then call update()
const user = await descopeClient.management.user.load('leo@descope.com');
const updt = await descopeClient.management.user.update(user.loginIds[0], user.email, user.phone, user.displayName, user.roleNames, user.tenants, {param1: 'PRO', param2: 1689018774081, param3: 'xxxxxx'})
but the same applies for any parameter that you wish to update but is in a different order.
Suggestion: change parameters to an object so we send just the ones we need
OR
add a skip value (e.g. if email==='_' doNotUpdateThis
).
also the updateCustomAttribute()
could be accept more than one attribute per call.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request