Hi Daniel,
Thank you for your reply.
The mapping is there, but we need manager to be mapped to manager:
$ ucr get office365/attributes/mapping/manager
manager
When restarting the listener, I can see in the log that it’s aware of the attributes and their mapping:
LISTENER ( ERROR ) : o365(I): office365-user.<module>:166 attributes mapping UCS->AAD: {'telephoneNumber': 'telephoneNumber', 'employeeType': 'jobTitle', 'mailPrimaryAddress': 'otherMails', 'title': 'Title', 'mobile': 'mobile', 'roomNumber': 'physicalDeliveryOfficeName', 'l': 'city', 'st': 'usageLocation', 'mailAlternativeAddress': 'otherMails', 'manager': 'manager', 'street': 'streetAddress', 'sn': 'surname', 'postalCode': 'postalCode', 'mail': 'otherMails', 'givenName': 'givenName', 'displayName': 'displayName'}
LISTENER ( ERROR ) : o365(I): office365-user.<module>:170 attributes to sync: ['displayName', 'employeeType', 'givenName', 'l', 'mail', 'mailAlternativeAddress', 'mailPrimaryAddress', 'manager', 'mobile', 'postalCode', 'roomNumber', 'sn', 'st', 'street', 'telephoneNumber']
When I force a resync with univention-directory-listener-ctrl resync office365-user
I get the following error in /var/log/univention/listener.log
LISTENER ( ERROR ) : o365(I): azure_handler._modify_objects:341 Modifying user with object_id u'77adf762-073e-481c-9db6-2dc4fada4ae2' and modifications
{'accountEnabled': True, 'surname': 'XXX', 'mailNickname': 'XXX', 'jobTitle': 'XXX', 'userPrincipalName': 'user@example.com',
'immutableId': 'XXX', 'manager': 'cn=manager,cn=Users,dc=example,dc=com', 'otherMails': 'user@example.com', 'displayName': 'XXX',
'givenName': 'XXX', 'usageLocation': 'US'}...
LISTENER ( ERROR ) : o365(D): azure_auth.get_access_token:359 Token valid until 2019-05-08T12:51:25.
Traceback (most recent call last):
File "/usr/lib/univention-directory-listener/system/office365-user.py", line 319, in handler
new_or_reactivate_user(ol, dn, new, old)
File "/usr/lib/univention-directory-listener/system/office365-user.py", line 241, in new_or_reactivate_user
new_user = ol.create_user(new)
File "/usr/lib/pymodules/python2.7/univention/office365/listener.py", line 138, in create_user
self.ah.create_user(attributes)
File "/usr/lib/pymodules/python2.7/univention/office365/azure_handler.py", line 312, in create_user
obj_id={"key": "immutableId", "value": attributes["immutableId"]})
File "/usr/lib/pymodules/python2.7/univention/office365/azure_handler.py", line 299, in _create_object
modifications=attributes)
File "/usr/lib/pymodules/python2.7/univention/office365/azure_handler.py", line 345, in _modify_objects
return self.call_api("PATCH", url, modifications)
File "/usr/lib/pymodules/python2.7/univention/office365/azure_handler.py", line 189, in call_api
data = self._prepare_data(data)
File "/usr/lib/pymodules/python2.7/univention/office365/azure_handler.py", line 664, in _prepare_data
if azure_attribute_types[k] == list and not isinstance(v, list) and isinstance(v, collections.Iterable):
univention.office365.azure_handler.UnkownTypeError: Attribute 'manager' not in azure_attribute_types mapping.