RogerSelwyn / MS365-ToDo

Microsoft 365 To Do Integration for Home Assistant
MIT License
9 stars 0 forks source link

setup - authentication problem #36

Open mmlody opened 2 hours ago

mmlody commented 2 hours ago

hello

I gave problem with authentication Mail modulu Everything prepared step by step with documentation, i try authenticate with alternate method (HA available from public internet) Everytime when I try to authenticate (click on "Link MS365 account" in home assistant I always get error from Microsoft aboy bad return url

"AADSTS50011: The redirect URI 'https://ha._MASKED_PUBLIC_DOMAIN/api/ms365' specified in the request does not match the redirect URIs configured for the application"

In documentation return URL is https://PUBLIC_URL_OF_HA/api/ms365_todo and this URL is entered to app registration in AAD

Why return url returned by microsft was trimmed down only to /api/ms365 ? When I try to open URL builed with documentation (http://PUBLIC_URL_OF_MY_HA/api/ms365_todo I always get only "404. Not Found"

image

Another intergration to 365 platform (old O365-HomeAssistant https://github.com/RogerSelwyn/O365-HomeAssistant) I configured without problems but sending mails from this old integration not working

Is "new" Mail integration ready to configuration and use ?

RogerSelwyn commented 2 hours ago

I'll check it next week (25th) when I get a chance.

mmlody commented 2 hours ago

I'll check it next week (25th) when I get a chance.

Sure

One small thing: return URL sie same in module _ToDo and _Mail ?

From documentation of _Mail module

image

From documentation od _ToDo module

image

RogerSelwyn commented 2 hours ago

I think if you adjust the url on your Entra Id app, to just ms365, it should work.

RogerSelwyn commented 1 hour ago

Yep, pretty sure that should work, looking at the code. So it is the same url for all integrations (apart from o365).