I got it working again. MSFT has updated the native client URL. If you add https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize to your list of valid URL redirects everything starts working again.
Do you know if this is a recent change? Iām trying to create a fork of Patrickās repository with the relevant changes (version, tzlocal, etc) so that it is āeasilyā installable. Iāve just tried using the url from the Readme, and it does still seem to work (to at least I get my two calendars). I think you should only need it for initial authentication, after that I donāt think it is required (not 100% sure).
If you have MFA then you need tge uodated URL too.
OK, Iāll try and add some words to the readme. I donāt have MFA switched on (I probably should do), so maybe difficult for me to test.
I just tested the above URL for non-MFA and it works with that too. It probably would be useful to fork this so it can be maintained by the community.
My fork is as below.
The challenge for me is that I only use the calendar, so have have never tried the email aspect of it. Iām happy for anyone to take on the code, but for now I have submitted a āWheelā based on my repository to HA and also submitted a Logo to the branding repository. In addition Iāve fixed the manifest, plus changed code based on recommendations from VS Studio (there was some invalid YAML in services.yaml), Codefactor, Depndabot and some outstanding Sourcery pull requests. Iām currently waiting on an update to the O365 pypi module so include the tzlocal change, so I can back that out of the manifest since it doesnāt really belong there.
My current release is v2.2.4
I assume from this that you have both MS URLs set as Redirect URIs? If I just use āSign in to your accountā it wonāt complete (mismatch uri error).
I do have both in my redirects.
And is this only if you are using the alternate authentication path, or for both authentication paths?
Thanks for all the work on this. I use Outlook for email/calendar and do not like the lag between outlook and google when using the ics calendar. I think Iāve got most of it up and running, but one problem Iām having is with all-day events. The start time is always 4 hours earlier than expected. Assuming this is because outlook bases everything off of GMT and thereās something not working correctly to adjust the time (offset). Standard events (non-all-day) work fine. Any thoughts on how to correct?
I would suspect that is the case. If you can raise an issue on my GitHub (not ptstās) then I will try to take a look. I have a certain amount of experience with calendars in my programming past, but not with O365, so no promises. Iām away for a week, so wonāt look at it for 10 days.
Thank you. Will do. Safe travels.
I have posted a potential fix here. Please note it is a beta version, so please treat as such and report on the issue @BigMal raised.
Thanks Roger. I just updated to the beta and it appears to be functioning correctly. I will continue to use and will let you know if I see any issues. Thanks so much for all your efforts on this. Itās very useful to O365 users!
Thanks, Iāll release fully in a couple of days.
I just moved over to your fork. Appreciate you taking this on for at least hosting. I will contribute accordingly too.
Thanks so much for maintaining this! Iām using it right now to play the Fox NFL theme on the echo and turn the lights to green and gold when a packer game is on. But I want it to do it 30 minutes prior to kickoff. Is the āoffsetā option meant for this? Iāve tried to get it to work, but Iām starting to think Iām not understanding the true intention of the option. If this isnāt what it is meant for, is there another way I can trigger 30 minutes prior to a calendar event?
If you mean the start_offset and end_offset, that is just the period of time from now that it will return events for so they are available in the HA calendar.
So this is part of my confusion. If I have start offset at 0 and end offset at 24, then Iām expecting it would pull 1 dayās worth of appointments. But when I click on the calendar icon on the left hand side of the screen, it pulls in seemingly every single appointment for months out. What am I not correctly understanding?
Given that I have only taken this code on recently, just to keep it going, Iām having to do some digging to figure out how it works.
It looks like the start and end offsets are what populate the calendar entity that is shown in Developer Tools.
The Calendar tab is not controlled by those values. When I do a query now, I can see it passes 23:00 last night to midnight on the 8th November as the query, which is enough to fill the visible portion of the calendar. If I page forward a month, it then queries for start of month to 13th December which again covers the visible calendar.
I canāt quite see where it gets the content prior to today from, I suspect it will be cached somewhere.