Univention Bugzilla – Bug 56279
office365/state: MSGraphError: HTTP response status: 403 (https://graph.microsoft.com/v1.0/users)
Last modified: 2023-07-06 18:34:16 CEST
Similar to Bug 56188, but different status-code and request Version: 5.0-2 errata425 Error: Interner Server-Fehler in "office365/state". Request: office365/state Traceback (most recent call last): File "%PY3%/univention/office365/microsoft/exceptions/core_exceptions.py", line 268, in inner return func(*args, **kwargs) File "%PY3%/univention/office365/microsoft/core.py", line 864, in _call_graph_api raise MSGraphError(response, expected_status=expected_status) univention.office365.microsoft.exceptions.core_exceptions.MSGraphError: HTTP response status: 403 HTTP response expected status: [200] > request url: https://graph.microsoft.com/v1.0/users > request header: { "User-Agent": "Univention Microsoft 365 Connector", "Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Connection": "keep-alive", "Authorization": "XXX", "Content-Type": "application/json" } > request body: -NONE- > response header: { "Cache-Control": "no-cache", "Transfer-Encoding": "chunked", "Content-Type": "application/json", "Content-Encoding": "gzip", "Vary": "Accept-Encoding", "Strict-Transport-Security": "max-age=31536000", "request-id": "************************************", "client-request-id": "************************************", "x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"***\",\"Slice\":\"E\",\"Ring\":\"5\",\"ScaleUnit\":\"000\",\"RoleInstance\":\"***************\"}}", "x-ms-resource-unit": "2", "Date": "Fri, 17 Mar 2023 18:14:51 GMT" } > response body: { "error": { "code": "Authorization_RequestDenied", "message": "Insufficient privileges to complete the operation.", "innerError": { "date": "2023-03-17T18:14:51", "request-id": "************************************", "client-request-id": "************************************" } } } During handling of the above exception, another exception occurred: Traceback (most recent call last): File "%PY3%/univention/management/console/base.py", line 344, in __error_handling six.reraise(etype, exc, etraceback) File "%PY3%/six.py", line 693, in reraise raise value File "%PY3%/univention/management/console/base.py", line 247, in execute function.__func__(self, request, *args, **kwargs) File "%PY3%/univention/management/console/modules/decorators.py", line 321, in _response result = _multi_response(self, request) File "%PY3%/univention/management/console/modules/decorators.py", line 181, in _response return function(self, request) File "%PY3%/univention/management/console/modules/decorators.py", line 443, in _response return list(function(self, iterator, *nones)) File "%PY3%/univention/management/console/modules/decorators.py", line 289, in _fake_func yield function(self, *args) File "%PY3%/univention/management/console/modules/office365/__init__.py", line 227, in state users = core.list_users() File "%PY3%/univention/office365/microsoft/core.py", line 972, in list_users return self._call_graph_api('GET', URLs.users(params=params), expected_status=[200], page=True) File "%PY3%/univention/office365/microsoft/exceptions/core_exceptions.py", line 274, in inner raise exception_class(e) univention.office365.microsoft.exceptions.core_exceptions.GraphPermissionError: Forbidden Error. Your application may not have the correct permissions for the Microsoft Graph API. Please check https://help.univention.com/t/18453. HTTP response status: 403 HTTP response expected status: [200] > request url: https://graph.microsoft.com/v1.0/users > request header: { "User-Agent": "Univention Microsoft 365 Connector", "Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Connection": "keep-alive", "Authorization": "XXX", "Content-Type": "application/json" } > request body: -NONE- > response header: { "Cache-Control": "no-cache", "Transfer-Encoding": "chunked", "Content-Type": "application/json", "Content-Encoding": "gzip", "Vary": "Accept-Encoding", "Strict-Transport-Security": "max-age=31536000", "request-id": "************************************", "client-request-id": "************************************", "x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"***\",\"Slice\":\"E\",\"Ring\":\"5\",\"ScaleUnit\":\"000\",\"RoleInstance\":\"***************\"}}", "x-ms-resource-unit": "2", "Date": "Fri, 17 Mar 2023 18:14:51 GMT" } > response body: { "error": { "code": "Authorization_RequestDenied", "message": "Insufficient privileges to complete the operation.", "innerError": { "date": "2023-03-17T18:14:51", "request-id": "************************************", "client-request-id": "************************************" } } } Role: domaincontroller_master