Office 365 Konnector - 401 Forbidden

Hallo allerseits.

Ich versuche aktuell die UCS Domäne mit der Azure Domäne zu verbinden, aber leider scheitert es im letzten Schritt.

UCS: 4.4-8 errata1069
Office 365 Connector: 4.0
Reverse Proxy: nginx

Sobald ich die Federation Metadata URL im Wizard eingebe, erscheint der Fehler unten “o365: Unknown Azure AD connection ID u’83d17d0f-afb2-42c9-bdc5-401343a1c2d2’” im Log. Das ist meinem Verständnis nach aber normal, da sie ja noch nicht im UCS bekannt ist.

Wenn ich nun den letzten Schritt der Autorisierung durchführe (user in der UCS ist ein Domänen-Admin und der User in Office 365 ist ein Global Admin), die Authentifizierung abgeschlossen und nun die Rechte erteilen will, bekomme ich nur eine weiße Seite und nginx meldet “401” (siehe unten).

# cat /var/log/univention/management-console-module-office365.log
29.10.21 16:36:08.909  DEBUG_INIT
29.10.21 16:36:10.478  MODULE      ( PROCESS ) : Loading python module.
29.10.21 16:36:10.719  MODULE      ( PROCESS ) : Imported python module.
29.10.21 16:36:10.724  MODULE      ( PROCESS ) : Module instance created.
29.10.21 16:36:10.724  MODULE      ( PROCESS ) : Module socket initialized.
29.10.21 16:36:10.752  MODULE      ( PROCESS ) : Setting user LDAP DN u'uid=u.user,ou=employees,dc=example,dc=local'
29.10.21 16:36:10.752  MODULE      ( PROCESS ) : Setting auth type to None
29.10.21 16:36:10.753  MODULE      ( PROCESS ) : Initializing module.
29.10.21 16:36:10.753  MODULE      ( PROCESS ) : adconnection_alias='defaultADconnection'
29.10.21 16:37:54.738  PARSER      ( WARN    ) : Attribute status just available for MIME type application/json
29.10.21 16:38:20.316  LISTENER    ( ERROR   ) : o365: Unknown Azure AD connection ID u'83d17d0f-afb2-42c9-bdc5-401343a1c2d2'.
29.10.21 16:38:20.423  PARSER      ( WARN    ) : Attribute status just available for MIME type application/json

nginx Log

10.0.90.3 - - [29/Oct/2021:16:39:39 +0200] "POST /microsoft365-authorize HTTP/1.1" 200 2183 "https://login.microsoftonline.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"
10.0.90.3 - - [29/Oct/2021:16:39:39 +0200] "POST /univention/command/office365/authorize_internal HTTP/1.1" 401 1870 "https://sso.example.de/microsoft365-authorize" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"

Irgendwelche Ideen?

Danke

Hat niemand eine Idee woran es liegen könnte?

Habe soeben noch das im Log gefunden:

==> /var/log/univention/management-console-server.log <==
17.11.21 12:59:33.544  MAIN        ( WARN    ) : Module None (command=u'office365', id=u'163715037346628-204') does not exists anymore
17.11.21 12:59:33.560  MODULE      ( PROCESS ) : Forbidden

==> /var/log/univention/management-console-web-server.log <==
17.11.21 12:59:33.561  MAIN        ( PROCESS ) : CPCommand (10.0.10.1:42688) response status code: 401
17.11.21 12:59:33.561  MAIN        ( PROCESS ) : CPCommand (10.0.10.1:42688) response reason : None
17.11.21 12:59:33.561  MAIN        ( PROCESS ) : CPCommand (10.0.10.1:42688) response message: Forbidden
17.11.21 12:59:33.561  MAIN        ( PROCESS ) : CPCommand (10.0.10.1:42688) response result: None
17.11.21 12:59:33.561  MAIN        ( PROCESS ) : CPCommand (10.0.10.1:42688) response error: {u'traceback': None, u'command': u'handle_request_command'}

==> apache log
10.0.10.1 - - [17/Nov/2021:14:00:24 +0100] "POST /univention/command/office365/authorize_internal HTTP/1.0" 401 2395 "https://sso.XXX.XXX/microsoft365-authorize" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
10.0.10.1 - - [17/Nov/2021:14:00:25 +0100] "POST /univention/get/session-info HTTP/1.0" 401 582 "https://sso.XXX.XXX/univention/command/office365/authorize_internal" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

image

Drückt man auf “OK” kommt

image

und im Apache log wird ab jetzt immer das wiederholt.

10.0.10.1 - - [17/Nov/2021:14:04:59 +0100] "POST /univention/get/session-info HTTP/1.0" 401 582 "https://sso.XXX.XXX/univention/command" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

Es scheint also am Zugriff auf session-info zu klemmen.
Aber warum?
Als Reverse Proxy kommt ist nginx mit dieser Konfiguration im Einsatz https://wiki.univention.de/index.php/Cool_Solution_-Reverse_Proxy_for_UCS_Portal_and_Services#Example_configuration_for_nginx.28as_Reverse_Proxy.29

Hallo,

gabs hierfür eine Lösung? Ich habe exakt das selbe Problem.

Gruß,

Mastodon