Closed SpeijerTom closed 1 month ago
Please post your config with relevant details redacted. Also post the full errors displayed in your logs.
ERROR 1 I see in the debug logging the following : 2024-09-26 10:29:44.904 WARNING (MainThread) [custom_components.ms365_calendar.integration.permissions_integration] 'enable_update' should not be true when 'basic_calendar' is true .for account: BHEALTHY ReadBasic used.
however that error i also get for the other tenant which works perfect
ERROR 2 2024-09-26 10:29:45.879 ERROR (SyncWorker_8) [O365.connection] Client Error: 404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/me/calendars | Error Message: The mailbox is either inactive, soft-deleted, or is hosted on-premise. | Error Code: 2024-09-26 10:29:45.884 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up ms365_calendar platform for calendar Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/ms365_calendar/calendar.py", line 17, in async_setup_entry return await async_integration_setup_entry(hass, entry, async_add_entities) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ms365_calendar/integration/calendar_integration.py", line 106, in async_integration_setup_entry await async_scan_for_calendars(hass, entry) File "/config/custom_components/ms365_calendar/integration/calendar_integration.py", line 768, in async_scan_for_calendars calendars = await hass.async_add_executor_job(schedule.list_calendars) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/O365/calendar.py", line 1933, in list_calendars response = self.con.get(url, params=params or None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/O365/connection.py", line 898, in get return self.oauth_request(url, 'get', params=params, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/O365/connection.py", line 887, in oauth_request return self._internal_request(self.session, url, method, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/O365/connection.py", line 848, in _internal_request raise HTTPError('{} | Error Message: {}'.format(e.args[0], error_message), requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/me/calendars | Error Message: The mailbox is either inactive, soft-deleted, or is hosted on-premise.
however i'm not sure if that is for this integration, or for the previous integration from yourself
ERROR 3
2024-09-26 10:49:24.516 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath('/config/ms365_storage/.MS365-token-cache/ms365_calendar_BHEALTHY.token'), 'r') inside the event loop by custom integration 'ms365_calendar' at custom_components/ms365_calendar/config_flow.py, line 253: return account, account.is_authenticated (offender: /usr/local/lib/python3.12/site-packages/O365/utils/token.py, line 239: with self.token_path.open('r') as token_file:), please create a bug report at https://github.com/RogerSelwyn/MS365-Calendar/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
File "
2024-09-26 10:49:24.517 WARNING (MainThread) [custom_components.ms365_calendar.integration.permissions_integration] 'enable_update' should not be true when 'basic_calendar' is true .for account: BHEALTHY ReadBasic used. 2024-09-26 10:49:24.519 DEBUG (MainThread) [custom_components.ms365_calendar.config_flow] Token file: /config/ms365_storage/.MS365-token-cache/ms365_calendar_BHEALTHY.token
enable_update
- just turn off the setting in your config/config/custom_components/ms365_calendar/integration/calendar_integration.py
- this tells you which integration it is, the ms365_calendar integrationError Message: The mailbox is either inactive, soft-deleted, or is hosted on-premise
- This tells you the error coming back from Microsoft (which the integration does not handle because I've never seen it before).Detected blocking call to open with args (PosixPath('/config/ms365_storage/.MS365-token-cache/ms365_calendar_BHEALTHY.token'), 'r') inside the event loop by custom integration 'ms365_calendar' at custom_components/ms365_calendar/config_flow.py, line 253
- Tells me this is a bug which I need to fix (it is a new check that HA core does, currently a Warning not an error).I would expect the 500 error is caused by no 3, which you will need to fix. Hopefully the error tells you where your issue is, but it is not something I can advise on or solve. You can validate by testing the relevant call here - https://developer.microsoft.com/en-us/graph/graph-explorer
Roger,
I found the issue, you may close this issue. Altough I think it is very strange, I created an App registration with an admin user that doesn't have a mailbox assigned... => resulted in that error I now gave a user that has a mailbox, global admin rights, created the app registration
and now it works ...
very strange imo
did you remove the global admin permission afterwars? This would be a no go here :-(
First, I would like to thank you for your awesome work. (I have been using your O365 integration, but only needed the calendar and because i have multiple tenants, this integration was exactly what I needed).
I have succesfully configured 1 tenant, this works perfectly When adding another tenant/entry (where i followed the same steps), i get no entities back.
If i click on configure, it gives me error 500
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble
I checked (i believe) all, permissions, retried the client id, secret,
Any idea?