Landscape add user keyerror "email" on Ubuntu Core 22

Hey,

I am trying to add new users to an Ubuntu Core device through the Landscape API.

Landscape has fields for creating a user are:

Required parameters:
computer_ids: he numerical IDs of the computers.
username: The username of the new user.
name: The title name of the new user.
password: The password of the new user.

Optional parameters:
require_password_reset: Requires the user to reset their password on first login.
primary_groupname: The group the new user will be assigned to.
location: The location of the new user.
home_phone: The home phone number of the new user.
work_phone: The work phone number of the new user.

After the action has been tried, I get an error that email is missing:

Is this functionality supported on Ubuntu Core? I guess on Ubuntu Core users get added by their SSO account rather than just through username + password, maybe this is the issue here?

It seems like the add User option of Landscape is not catered towards Ubuntu Core.

Running this script instead seems to work.

1 Like