O365 --> MS365 - A potential big change - your views needed #234
Replies: 19 comments 51 replies
-
I only really use to-do I have no strong feelings either way. If it's easier for you to break it up. That's good enough for me. |
Beta Was this translation helpful? Give feedback.
-
Probably in Teams, but I may make that a fourth Integration. It’s quite complex like calendar. |
Beta Was this translation helpful? Give feedback.
-
@RogerSelwyn thank you for the open communication! I would fully support the split into separate integrations like you did for Calendar. It might be a (bit of a) pain for users, but I can see it benefits the maintenance of the integrations. |
Beta Was this translation helpful? Give feedback.
-
@RogerSelwyn I've been using this since you took it over and appreciate the long-term effort and commitment you've made to this project. I like the idea of breaking up the code to reduce the load on the system and the less code the fewer bugs affect any particular install. Are you concerned you could wind up making the same changes 3-4 times? |
Beta Was this translation helpful? Give feedback.
-
As a passing comment, I haven't taken advantage of HA application credentials, because in general that seems to assume it will request, hold and manage the token, and the python-o365 simply isn't structured to work like that. |
Beta Was this translation helpful? Give feedback.
-
I do think it's logical to break it up, as realistically there are different use cases across the M365 stack, plus it allows more people to contribute to certain areas of passion (and hopefully for those who have created other "competing" components to pool their efforts into these ones). |
Beta Was this translation helpful? Give feedback.
-
First of all thank you for the work you put in to this. To me it seems a good choice as looking at other comments here more people just use a part of the functionality of the O365 integration same as I do. I only need/use it for getting Calendar data of my Outlook Calendar from work, so I personally I prefer a less heavy integration giving me just what I need. So definitely a +1 from me on this. I surely will try out the M365-Calendar integration. |
Beta Was this translation helpful? Give feedback.
-
For those interested, I have started writing up some documentation on what calls are made as part of the main retrieval cycle - https://github.com/RogerSelwyn/O365-HomeAssistant/wiki I need to think about repository structure, to see if I can store all the integrations in one repository rather than multiple. This will depend on what HACS supports. |
Beta Was this translation helpful? Give feedback.
-
I've just released a first version of the MS365-ToDo integration. Again needs 2024.6.x |
Beta Was this translation helpful? Give feedback.
-
I've just released a first version of the MS365-Mail integration. Again needs 2024.6.x Teams is still to come, but won't get done until mid-July. I've also requested HACS inclusion for the three already done, but that will take some months to get included. |
Beta Was this translation helpful? Give feedback.
-
I've just release a first version of MS365-Teams. I will submit a HACS inclusion request as soon as the brand icon has been accepted into HA Core. Expect HACS to take many months, it is very, very slow. |
Beta Was this translation helpful? Give feedback.
-
Just to update. HACS seems to have stopped accepting new integrations at the moment. I suspect this is because a new version is being developed which is currently in Alpha (or was when I looked a week ago). Hopefully when it is released they will work through the backlog. I will endeavour to maintain both the O365 integration, and the split up versions until they make it onto HACS proper. I will then do some "marketing" on the new ones to encourage the move so I can decommission the old. This of course may take some time. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the updates! Appreciate all your hard work. |
Beta Was this translation helpful? Give feedback.
-
Amazing work. Thank you!!! IMHO, this should be HA core. |
Beta Was this translation helpful? Give feedback.
-
I would love to chat/discuss with you about the O365 ./. M365 challenge. |
Beta Was this translation helpful? Give feedback.
-
Hi @RogerSelwyn - some great work here and I use mainly the Teams side of things, but have an awful lot of experience with Graph API itself. As we're using OAuth flows, shouldn't the integrations use Application Credentials in HA as documented here? https://developers.home-assistant.io/docs/core/platform/application_credentials/ As a side note - breaking this down will help me contribute to areas I use the most (Teams), so will probably start sending some PRs soon for new functionality. |
Beta Was this translation helpful? Give feedback.
-
@RogerSelwyn - can you advise on the best way to upgrade from O365 to MS365 Calendar. Can we install side by side or save any config, or is it set the new one up from scratch? |
Beta Was this translation helpful? Give feedback.
-
Roger, This is a duplicate of the post on the HASS Forums, so feel free to respond in either - I'll get notified. thank you so much for your hard work on this module. I got the original o365 working and that seemed to be relatively easy (I’m pretty familiar with graph and application permissions in Entra). I noticed you were moving to separate installs using the new configuration and one per function. I think that’s great, and downloaded and installed the MS365 - Calendar module and got THAT working as well, and removed the yaml entries for the o365 module and am using just the new one. A couple of possible edits for your documentation. When searching in HACS for the repository, since it’s not in the main one and you need to use custom the steps are: Search for rogerselwyn/MS365-Calendar to find the repository when using custom. Without your name at the beginning it can’t find it. I have just a couple questions: If I am loading the calendar for more than one user into HASS do I just add it as a second integration with a different email account name? Or is there a method to add an additional user using the existing entry? If I am adding it again do I do that from HACS or from the HASS integration page? Oh and just one more note - if you have entraID P1 or 2 and have the ability to configure conditional access it’s a REALLY good idea to set a policy that only lets the public IP address of your home server access the app you configure in Entra, and limit access to only accounts that you want to retrieve calendars for. If you have a fixed IP you can use that address as the allowed location, and block all other locations. This severely limits the ability for anything else to access it - even if they somehow got your app id and secret. If you’d like to add a documentation section on doing that, I’d be happy to write it. Let me know. |
Beta Was this translation helpful? Give feedback.
-
yeah mfa is essential these days. I try to avoid creating accounts on
services or sites that don't offer it. Plus Microsoft has already made it
mandatory for admin, and will probably make it mandatory for all soon.
Might as well get the pain out of the way now.
-----------------------------------
Lee Drake
***@***.***
…On Wed, Feb 5, 2025 at 12:24 PM RogerSelwyn ***@***.***> wrote:
So I've just gone through and added MFA to my account, and will swap
everyone to having MFA enabled/enforced. Some re-login will be required.
Good news, it's identified an exception in the code I need to handle
better.
—
Reply to this email directly, view it on GitHub
<#234 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQ3HFKKYQQGRHAVFR6H7CL2OJCM5AVCNFSM6AAAAABISWZCIOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBXGI2DSOI>
.
You are receiving this because you commented.Message ID:
<RogerSelwyn/O365-HomeAssistant/repo-discussions/234/comments/12072499@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
👋 Your views needed!
I'm using Discussions as a place to connect with other members of the community and understand your point of view on a potential major change.
I've noted in the release notes to v4.8.0 that the integration is becoming unwieldy. It has grown under my stewardship from an integration that supported calendars and email, to one that supports a whole variety of different sensors. This makes it slow to start up and operate and along with being a massive chunk of code to maintain.
I've started down a road that to breaking this up into smaller components, probably along the lines of
Calendar
,Email
andTeams
. To that end I have created a new integration just for calendars. I've branded this asMS365
inline with Microsoft's changed branding of Office 365 to Microsoft 365. This has the benefit of clearly separating the integrations.I'm very conscious that there is a significant following of this integration, so this may be an unpopular change, but I feel it is necessary. Other may suggest doing it another way, and I'm certainly open to views. My knowledge of what can be done with Python and HA is a long way of perfect, I'm an enthusiastic amateur.
I've taken to decision to make in the installation of the integration as being UI only. The calendars.yaml file still exists and the calendars can be managed via that method, but there is the ability to modify most of the config via the UI.
Again, this may be an unpopular decision because many want to be yaml only. I have previously managed an integration that does both YAML and UI, but it is a pain, so I'm not doing it again. I think with recent advances in the HA UI around reconfigure and reload, this will remove the need to go delete tokens or reboot HA.
Anyway, I'm open to comments. For reference the new calendar is here MS365-Calendar. I would warn that it needs HA 2024.6.x since it incorporates changes included with that release.
Beta Was this translation helpful? Give feedback.
All reactions