Problem:
During sync (listener.log) the following error occurs
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/univention/listener/api_adapter.py", line 166, in _handler
self._module_handler.create(dn, new)
File "/usr/lib/univention-directory-listener/system/office365-user.py", line 75, in create
self.connector.create(udm_object=udm_user)
File "/usr/lib/python2.7/dist-packages/univention/office365/connector/connector.py", line 519, in create
self.new_or_reactivate_user(udm_object)
File "/usr/lib/python2.7/dist-packages/univention/office365/connector/connector.py", line 479, in new_or_reactivate_user
self._assign_subscription(udm_user=udm_object, azure_user=user_azure)
File "/usr/lib/python2.7/dist-packages/univention/office365/connector/connector.py", line 456, in _assign_subscription
deactivate_plan_ids = selected_subs_sku.get_plans_id_from_names(deactivate_plans)
AttributeError: 'NoneType' object has no attribute 'get_plans_id_from_names'
The error indicates, that during group sync, service plans are found, but the naming does not fit.
https://forge.univention.org/bugzilla/show_bug.cgi?id=57094
Investigation:
udm office365/profile list
could look like:
DN: office365ProfileName=Office 365 Subscription Teacher,cn=profiles,cn=office365,dc=schein,dc=de
name: Office 365 Subscription Teacher
subscription: OFFICESUBSCRIPTION_FACULTY
DN: office365ProfileName=Office 365 Subscription Student,cn=profiles,cn=office365,dc=schein,dc=de
name: Office 365 Subscription Student
subscription: OFFICESUBSCRIPTION_STUDENT
DN: office365ProfileName=Default Office 365 Subscription,cn=profiles,cn=office365,dc=schein,dc=de
name: Default Office 365 Subscription
subscription: ENTERPRISEPACK
Compare the names and with the subscriptons/service plans in Azure
or
/usr/share/univention-office365/scripts/print_subscriptions defaultADconnection
Using Azure AD connection alias 'defaultADconnection'.
Subscriptions
=====================
Subscription | Applies to | Status | Consumed | Remaining | Prepaid (*)
--------------------------------------------------------------------------------------
OFFICESUBSCRIPTION_FACULTY | User | Enabled | 11 | 60 | 71/0/0
OFFICESUBSCRIPTION_STUDENT | User | Enabled | 7 | 493 | 500/0/0
STANDARDWOFFPACK_FACULTY | User | Enabled | 5 | 499995 | 500000/0/0
STANDARDWOFFPACK_STUDENT | User | Enabled | 4 | 999996 | 1000000/0/0
FLOW_FREE | User | Enabled | 1 | 9999 | 10000/0/0
--------------------------------------------------------------------------------------
(*) enabled/suspended/warning
Check if the Default Office 365 Subscription
is enabled at the groups:
univention-ldapsearch '(&(univentionObjectType=groups/group)(univentionOffice365ProfileLink=office365ProfileName=Default Office 365 Subscription,cn=profiles,cn=office365,dc=schein,dc=de))'
Solution:
Change “ENTERPRISEPACK” to „OFFICESUBSCRIPTION_STUDENT“ if the groups has no the Default Office 365 Subscription
enabled.