black-roland/homeassistant-microsoft-todo

Can't authenticate with MS graph API

BigValen opened this issue · 1 comments

I've set the redirect URI on an App Registration to be the same as defined in;

homeassistant:
    external_url: https://assistant.mydomain.net/
    internal_url: https://192.168.0.22/

However, on authenticating, I get: "No code returned from Microsoft Graph Auth API" when I'm redirected to:

https://assistant.mydomain.net/api/microsoft-todo?error=invalid_request&error_description=The%20request%20is%20not%20valid%20for%20the%20application%27s%20%27userAudience%27%20configuration.%20In%20order%20to%20use%20/common/%20endpoint%2c%20the%20application%20must%20not%20be%20configured%20with%20%27Consumer%27%20as%20the%20user%20audience.%20The%20userAudience%20should%20be%20configured%20with%20%27All%27%20to%20use%20/common/%20endpoint.&state=QoxE5asfcGxz8gdJ4B5k01gqb6hdvW

There is a link to https://www.home-assistant.io/integrations/http/#base_url on README.md - but I think that configuration is gone now ? It's not mentioned anywhere on that http integration page.

Hah. OK, this was problem between user & keyboard:

Turns out when you create an Azure 'client secret', it gives you a 'value' and an 'id'. I managed to use the 'id' as the secret, not the value. Also, if you can't dismiss the "I authorized successfully" button; restart homeassistant, and it'll work fine.

I'll close the bug, and leave this bug here in the hopes someone else can learn from my foolishness.