Copy existing users into SSO users
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const ssoUsers = await client.ssoUsers.copyUsers();ssoUsers.forEach((ssoUser) => {console.log(ssoUser);});}run();
{id: '312',username: 'mark.smith@example.com',external_id: 'Ja23ekjhsad',is_active: true,first_name: 'Mark',last_name: 'Smith',meta: {last_access: '2018-03-25T21:50:24.914Z'},groups: [{type: 'sso_group',id: '312'}],role: {type: 'role',id: '34'}}