Problem
The Office 365 Connector is not able to synchronize groups properly and throws and error like:
File "/usr/lib/python3/dist-packages/univention/office365/udmwrapper/udmobjects.py", line 500, in in_azure
alias_users = set(x.lower() for x in univentionOffice365ADConnectionAlias.get(self.current_connection_alias))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
Solution
Ensure that the ldap cache shade configuration at /usr/share/univention-group-membership-cache/shards.json also contains the Records for Office 365:
{
"db_name": "reverseUniventionOffice365ADConnectionAlias",
"key": "dn",
"ldap_filter": "(univentionObjectType=users/user)",
"reverse": true,
"single_value": false,
"value": "univentionOffice365ADConnectionAlias"
},
{
"db_name": "univentionOffice365Enabled",
"key": "dn",
"ldap_filter": "(univentionObjectType=users/user)",
"reverse": false,
"single_value": true,
"value": "univentionOffice365Enabled"
}
Investigation
It was analysed at which point the programming has issues to get the corresponding records.
Wrong:
root@master:~# python3
Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from univention.ldap_cache.cache import get_cache
>>> a = get_cache()
>>> list(a)
[('memberUids', <univention.ldap_cache.cache.backend.gdbm_cache.GdbmCache object at 0x7f45329a5850>), ('uniqueMembers', <univention.ldap_cache.cache.backend.gdbm_cache.GdbmCache object at 0x7f4532adb5d0>)]
Korrekt:
[('memberUids', <univention.ldap_cache.cache.backend.gdbm_cache.GdbmCache object at 0x7fafe9ed18d0>), ('uniqueMembers', <univention.ldap_cache.cache.backend.gdbm_cache.GdbmCache object at 0x7fafea007650>), ('reverseUniventionOffice365ADConnectionAlias', <univention.ldap_cache.cache.backend.gdbm_cache.GdbmCache object at 0x7fafea0075d0>), ('univentionOffice365Enabled', <univention.ldap_cache.cache.backend.gdbm_cache.GdbmCache object at 0x7fafea0061d0>)]