Closed riddledaxis closed 3 years ago
So I fixed this issue
I deleted my azure app and then I recreated it making sure that it was under my personal account as per the image below:
I also made sure that the Allow Public Client Flows was enabled.
This allowed me to link my Microsoft account, but there was an issue with the token retrieval to HA which created a CSRF error. Weirdly Microsoft showed my account as connected to the Azure HA app, but it wasn't connected in HA.
[O365.connection] Unable to fetch auth token. Error: (mismatching_state) CSRF Warning! State not equal in request and response.
I fixed this by using the alternative auth-flow
Everything now seems to be working
I'm having a problem configuring this integration, I have installed it through HACS and it is version 2.1.8.
I am running HassOS 5.9, HA 2020.12.1 and Supervisor version 2020.12.7
My configuration is:
I followed the instructions and had to change the config link as it was using the internal rather than the external URL. When I click the amended link and select the account to sign in as on the Microsoft page, it seems to sign me into Microsoft but then I still get the error.
"Error, the originating url does not seem to be a valid microsoft redirect"
If I manually type the external URL (that is being used by my Azure app) into my browser (https://myurl/api/o365), I also get the above error.
I am running the NGINX Proxy Manager for my external access, but this works fine with redirecting Google, Alexa and other external connections. So I do not think this is the problem.
As I have seen older fixes for similar issues, I have added the base_url and api_password back into my config but nothing seems to be working.
My HA logs only show this:
I would really appreciate any help you can offer with resolving this issue.