Adding LDAP users via plone.api

I have a Plone 4 site which uses LDAP for authentication. I have an API from another system which returns a list of user IDs which correspond to LDAP users. I want to add those users to a group in Plone.

I have a script which calls like this:

for userid in users_list:'mygroup', username=userid)

However, it throws an error about:

I think that plone.api is not checking if these users exist in LDAP. How can I either make it not check and add the usernames as strings, or how do I make the lookups work against LDAP?

Please have a look into

/acl_users/plugins/manage_active and subpages like
to understand which plugin is used/configured for what purpose and in which order - maybe this might already explain what is going on ?