Office 365 Integration

My work uses office 365 for mail and calendar. For a while now I used this O365 Integration from HACS to integrate with my work calendar so I could set my alarm based on the first event in the morning. This integration has had serious issues lately (including not updating to add the required version field to the manifest) and now I see it has been archived. It was great while it worked but it seems like the author is unable to maintain it anymore which is a bummer.

I was wondering if anyone else integrates with Office 365 with HA some other way. And if so would you mind sharing what you use?

GitHub - tybritten/ical-sensor-homeassistant: an iCal Sensor for Home Assistant

Works fine for me.
But I have not updated to the latest version since there is a breaking change that I have not dealt with yet.
So I can’t comment on the latest version, but the version prior works great.

Unfortunately getting an ical link isn’t possible for my work calendar. Searching it looks like outlook does allow that normally but I don’t see those options. I’m guessing my administrator disabled that since it would create a public link.

If you log in to your mail on the web then there will be that link somewhere.
I’ll see if I can find where it is when I’m at work tomorrow.

If it works for us then I’m sure it will work for you.
Everything is locked down on our computers.

When I go to Sharing & Permissions I see this:

There’s no “by link” option available. I can select a specific person by email address or contact name but if I enter an email which isn’t in my organization it says I don’t have permission to share with that person. Even people within my organization are restricted, like typing my own work email gives me that error. If you have steps please share and I’ll give it a try but I’m pretty sure my IT department does not allow that. The public link option is disabled in every collaboration tool we use, I wouldn’t expect office 365 to be different.

This is what it looks like for me.
I log in to my web email and the click settings, then show all settings.

Click calendar and shared calendar:

But now that I think about it, I know I made a setting in the past to make my calendar “public”.
When I look at my colleagues calendars they are “busy” but when they look at mine they see the meeting topic and all that.
I figured I don’t have any reason to hide those details, but perhaps that is a part of it.

I’ll see if I can find that setting.

EDIT… I see now that is the setting you have on your image.

If you are using Outlook 2016 then this may help:
How to share your online calendar with other applications using the iCalendar standard - SMS Client Reminders

I could not find the share button on my app though…

Just publish your calendar you want a ICS llnk for.

Settings > View all Outlook settings > Calendar > Shared Calendars leads to Publish a calendar

1 Like

Screen Shot 2021-09-20 at 2.13.15 PM

Following your directions, here’s the options I see under calendar. “Shared calendars” is not an available option.

As I said above, this is my work calendar. This is not an outlook.com account, it is managed by my IT department and the admin gets to choose what options are available to me based on their policies. Generally my IT department removes every “get a public, no-auth sharing link” in every collaboration tool we use and I wouldn’t expect outlook to be any different. This is why I was looking for an Office365 integration, since that requires proper authentication I was able to get that working without issue.

I have the same.
I need to use the microsoft authenticator app, sometimes… I haven’t really figured out why and when I need to use it but every now and then it tells me to authenticate.
But the calendar is open (thankfully).

Any word on the best way to get an O365 calendar into HA these days?

The one I posted in the second post is the one I find best so far.

Depending on the share settings in office 364 it could be that you don’t see the description.

This one in hacs works great:

I changed jobs and my new job does not use office for email so I dont use it anymore. But I was using it successfully as of the beginning of this year with a corporate office account that hid the share link.

It also uses authenticated oauth apis to get to the data. So personally I’d consider it a better option then the ical approach shown above anyway as that involves creating a public, unauthenticated link to your calendar. That would’ve bothered me even if I was on a personal office account and could see the share link.

If the cooperation want then they can disable the authentication, in my case it did not work, the account was blocked

Yep, totally true. On a managed account the sysadmin gets final say over what you can and cannot do. I bring it up only because it seems like it has a greater chance of working then the sharing option. Seems pretty unlikely a corporate IT department would allow people to make public, unauthenticated links to their calendars.

The public version has just “busy-notes”.

However, there is a way around it.
If you run outlook desktop version then you can enable VBA scripts in the registry then create a inbox rule to run the script on incoming calendar appointments to make a copy of the event to another public account.

When it’s all set up it gives such a warm feeling that you got around corporate idiocy.

1 Like

Just tried to set up the RogerSelwyn/O365 integration mentioned above, and I keep getting the below errors, and don’t see the please login process.

No token, or token doesn’t have all required permissions; requesting authorization for account: xxxxx

10:15:09 PM – (WARNING) Office 365 Calendar (custom integration)

Could not locate token at /config/o365_storage/.O365-token-cache/o365_xxxxx.token

10:15:09 PM – (WARNING) Office 365 Calendar (custom integration)

I am currently running into this exact same error.
Did you manage to resolve this?

Edit: Seems like I got it working by keeping the example config and just changing it’s values from there.

I’ve gotten farther, but not fully working just haven’t had the time to focus on it.
I looked at the logs, and saw that it wasn’t able to authenticate, copied the URL in the error and pasted it in my browser. This authorized the app, so I think it’s good to go and will mess with it sometime soon.