Closed gweinjc closed 5 months ago
The BulkUser models only allowed editing select properties instead of all systemUser properties that is indicated by the endpoint.
Before:
After:
A few of the properties were references to other existing models that had to be transformed/flattened such as the 'mfa' property.
$users = @( @{ id = '612010ef83e5ac3835fe0c57' jobTitle = 'BulkUpdateTest' department = 'BulkUpdateTest' Manager = '636a9aaf4db1beb9f7cb28dd' description = 'BulkUpdateTest' }, @{ id = '636a9aaf4db1beb9f7cb28dd' jobTitle = 'BulkUpdateTest' department = 'BulkUpdateTest' Manager = '612010ef83e5ac3835fe0c57' description = 'BulkUpdateTest' } ) Update-JcSdkBulkUser -Body $users
$users = @( @{ email = 'bulkUser1@jcbulkusertest.com' firstName = 'BulkUser1' lastName = 'BulkUser1' username = 'BulkUser1' jobTitle = 'BulkCreateTest' department = 'BulkCreateTest' description = 'BulkCreateTest' }, @{ email = 'bulkUser2@jcbulkusertest.com' firstName = 'BulkUser2' lastName = 'BulkUser2' username = 'BulkUser2' jobTitle = 'BulkCreateTest' department = 'BulkCreateTest' description = 'BulkCreateTest' } ) New-JCSdkBulkUser -Body $users -CreationSource 'jumpcloud:bulk'
Issues
What does this solve?
The BulkUser models only allowed editing select properties instead of all systemUser properties that is indicated by the endpoint.
Before:
After:
Is there anything particularly tricky?
A few of the properties were references to other existing models that had to be transformed/flattened such as the 'mfa' property.
How should this be tested?