Problem
If you get a similar error message when using the id-broker-plugin python scripts, it may be due to the fact that the latest ID-Connector version 2.3.3 has changed python.
The python package tenacity has been added as additional dependency to properly support the ID-Broker plugin (Issue #101).
https://docs.software-univention.de/ucsschool-id-connector/HISTORY.html#v2-3-3-2024-01-11
For example, to query whether the user has been correctly synchronized.
univention-app shell ucsschool-id-connector /var/lib/univention-appcenter/apps/ucsschool-id-connector/conf/plugins/packages/idbroker/verify.py users uid=max.muster
2024-04-23 05:15:30.523575 Searching LDAP with filter '(&(univentionObjectType=users/user)(objectClass=ucsschoolType)(uid=musa.erde))'...
2024-04-23 05:15:30.985929 Found 1 objects in 0.46 seconds.
Traceback (most recent call last):
File "/var/lib/univention-appcenter/apps/ucsschool-id-connector/conf/plugins/packages/idbroker/verify.py", line 530, in <module>
cli()
File "/usr/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/var/lib/univention-appcenter/apps/ucsschool-id-connector/conf/plugins/packages/idbroker/verify.py", line 135, in verify_users
user_objects = [ldap_object_to_user(o) for o in ldap_objects]
File "/var/lib/univention-appcenter/apps/ucsschool-id-connector/conf/plugins/packages/idbroker/verify.py", line 135, in <listcomp>
user_objects = [ldap_object_to_user(o) for o in ldap_objects]
File "/var/lib/univention-appcenter/apps/ucsschool-id-connector/conf/plugins/packages/idbroker/verify.py", line 362, in ldap_object_to_user
context[school] = SchoolContext(classes=[], roles=[role])
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for SchoolContext
workgroups
field required (type=value_error.missing)
Solution
Reinstall the id-broker-plugin will fix this failure.
apt install --reinstall id-broker-id-connector-plugin
or
univention-install id-broker-id-connector-plugin
After finished the installation, restart the container for the ID-Connector.
univention-app restart ucsschool-id-connector
For more Info, read the Docs please.
https://docs.software-univention.de/idbroker-school-authority-manual/installation.html#installation-on-school-authority-systems