Microsoft To-Do

It doesnt work :frowning:

Did the whole setup process again. But I cannot connect.

Nope, dosen’t connect, always get the same error message:

invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.
1 Like

I had that same message. You have to go to settings - general en put your external https base_url as internal and external. Then it’ll work! :slight_smile:

Hi,

I’m sure this is me doing something stupid, but I’ve tried everything.
I’ve setup the azure end and got the client ID and the secret.

When I try to link the account I get.

500 Internal Server Error
Server got itself in trouble

The URL is…

https://xxxxxxx.nabu.casa/api/microsoft-todo?code=xxxxxxxxVERYLONGCODExxxxxx&state=xxxxxxxxxxxxxxx&session_state=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx#

I’ve tried setting internal_url and external_url to the nabu casa id.
I’ve tried faking a hosts file to give me a local https URL and set it to that.

Whatever URL combination I use, I get this same error.

If I go to the URL without any parameters, I get…
# No code returned from Microsoft Graph Auth API

So I’m happy it’s the correct URL ?

Am I doing something wrong ?

Thanks

1 Like

I have the same problem as the previous speaker. Is there a solution in the meantime?

I didn’t have success with the Nabu Casa URL either and got it working via localhost (not with the hosts file - it’s not possible to forward localhost that way). If you enter this command (change it to your IP address and port) in the command line of Windows, this localhost port is forwarded to an external IP:
netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=8123 connectaddress=192.168.1.10 connectport=8123
Then you have to set your external IP in Home Assistant to localhost - and then you should be able to authenticate MS ToDo.

It still doesn’t work for me neither. Did anyone find a solution since then? Thanks for your feedback :slight_smile:

@Schocker, @Se7enair, @Erik_Madsen it’s a few years later but maybe your still interested to use this integration.

I find the way to get this working!
Maybe some steps can are not required for this but after these steps it worked.

Before you start here you need already have installed the Microsoft To-Do integration (via HACS).

These are the steps I took to authenticate and connect HA with Microsoft To-Do: (My Azure language is not English so I describe a bit which options to choose)

  1. Go to Microsoft Azure

  2. Go to App registration

  3. Create a new registration

  4. Give it a name like Home Assistant

  5. Choose the middle option as account type

  6. Set as platform Web and redirect url http://localhost:8123/api/microsoft-todo
    !! It’s not a problem that your Home Assistant is not available under this url, this url can be changed later to the right one to finish the registration.

  7. Click on the Register button

  8. In this overview you find the client_id, under Application-id (client-id) which you need in your configuration.yaml

  9. Go to Certificates and clientsecrets

  10. Create a new clientsecret and set a description and expire time

  11. Copy the value from Value. This is your client_secret for your configuration.yaml

  12. (I’m not sure if this step is also required) Go to Verification, you see here your defined redirect url http://localhost:8123/api/microsoft-todo, aan check the 2 checkboxes: access tokens and id tokens. Press the Save button.

  13. Open your configuration.yaml and add this:

calendar:
  - platform: microsoft_todo
    client_id: YOUR_CLIENT_ID_FROM_STEP_8
    client_secret: YOUR_CLIENT_SECRET_FROM_STEP_11

13b. (I’m not sure if this step is also required) I also added to this file this single line, without any extra properties. I found this on the page HTTP - Home Assistant . This page was linked from the README.md for base_url to allow HA to communicate with Azure.

http:
  1. Restart Home Assistant to apply this changes
  2. Go in Home Assistant to the side menu Settings > Settings (last item) > Global? (first tab) > section Home Assistant URL, uncheck the switch Automatic and fill in the url http://localhost:8123 (This is the replacement of the base_url option mentioned in the README.md) This url (without path) must 100% match the defined url in Azure otherwise you get the redirect_uri error message
invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.
  1. Go in Home Assistant to your Notifications (I didn’t got a trigger there was a new notification but there is). Here you see a new notification. Click on Configure to open the link.
  2. Login with your Microsoft credentials.
    If everything is setup correct you don’t get a redirect_uri or other error but a screen where you need to allow some rights.
  3. Then you get redirect to the defined (not existing localhost:8321) url. This results in a http 404 error page.
  4. Now change the url from localhost:8321 to your real url. Now you see a Congratulations text!
  5. Go to Home Assistant to your notifications and click again on Configure and on I authorized successfully. For me nothing changed here but at least I confirmed.
  6. Go to your entities en filter on calendar. Now you see all your To-Do lists, YEEHA!!!

Good luck!

How do you show your items on your dashboard?
I want them as switches and when I toggle I want it to be removed from the list. Is this possible?

2 Likes

Hello, Thanks for this tutorial however I still don’t understand exactly what to replace with localhost? And the redirect URI, could you precise this a bit more step by step
?

You are mentionning localhost:8321, is it an error and should it be localhost:8123?

1 Like

unfortunately this doesn’t work since the error still appears:

500 Internal Server Error
Server got itself in trouble

Also the click on the “I authorized successfully” doesn’t do anything…

Check the logs… I had a type in the client secret

I’ve just got the integration up and running. I would like to use it for family tasks planning, but I see the task but not any metadata, like who it’s assigned to or date.
Any way to circumvent this ? Maybe a list per person ?

I also see if you rename a list, the old one stays in the calendars. Any way to remove ?

Hi @GeertV, I’ve tried that also with this app integration but my problem was you can’t sort the tasks in the same order as it is in the app. And it’s not easy to create toggle of it to mark them as finished.

If that’s not a problem you can indeed create a list for each person.
My final version is with the Home Assistant helper toggles. Atm I’m writing a blog about my final result. When it’s online I’ll post the link here.

1 Like

@GeertV you can find here how I implemented my family task/chores planner. It’s basic on a static list of tasks.

1 Like

Is it possible to add task as starred/with star or as important?

Hi All,

Is it possible show the due date and assign to? Got the card up and working but struggling to show the fields in a custom attribute list

Hi All

Dont want to resurrect a dead thread but to inform everyone that Roger Selywn has updated his o365 addon to include To Do from Microsoft and works really well.

7 Likes

For some reason the ToDo Permission isnt available for me to select within Azure/Graph

Is there a way to see a todo list inside HA where I can add new tasks or set them as done?

I use Microsoft ToDo for some Shopping lists and want to use a card like the shopping list card which unfortunately seems to be standalone…