Show examples in:
    Delete a SSO user

    Query parameters

    destination_user_type  enum  Optional

    New owner for resources previously owned by the deleted SSO user. This argument specifies the new owner type.

    destination_user_id  string  Optional

    New owner for resources previously owned by the deleted SSO user. This argument specifies the new owner ID.

    Returns

    Returns a sso_user resource object.

    Examples

    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const userId = '312';
    const ssoUser = await client.ssoUsers.destroy(userId, {
    destination_user_type: 'user',
    destination_user_id: '7865'
    });
    console.log(ssoUser);
    }
    run();
    Returned output:
    {
    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'
    }
    }