{"id":13830333,"url":"https://github.com/thobach/MMM-MicrosoftToDo","last_synced_at":"2025-07-09T11:32:50.735Z","repository":{"id":43261010,"uuid":"229764033","full_name":"thobach/MMM-MicrosoftToDo","owner":"thobach","description":"MMM-MicrosoftToDo is a 3rd party module for MagicMirror (https://github.com/MichMich/MagicMirror) that shows open tasks from task lists. The tasks are retrieved from the Microsoft To Do / Outlook (https://todo.microsoft.com).","archived":false,"fork":false,"pushed_at":"2023-11-16T20:53:55.000Z","size":486,"stargazers_count":74,"open_issues_count":7,"forks_count":25,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-04T10:02:55.684Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thobach.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-23T14:04:54.000Z","updated_at":"2024-07-28T08:17:16.000Z","dependencies_parsed_at":"2023-11-16T22:13:45.025Z","dependency_job_id":null,"html_url":"https://github.com/thobach/MMM-MicrosoftToDo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thobach%2FMMM-MicrosoftToDo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thobach%2FMMM-MicrosoftToDo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thobach%2FMMM-MicrosoftToDo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thobach%2FMMM-MicrosoftToDo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thobach","download_url":"https://codeload.github.com/thobach/MMM-MicrosoftToDo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539379,"owners_count":17485314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T10:00:58.769Z","updated_at":"2024-11-20T11:30:40.359Z","avatar_url":"https://github.com/thobach.png","language":"JavaScript","funding_links":[],"categories":["Productivity"],"sub_categories":[],"readme":"\n[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)\n[![Vulnerabilities](https://snyk.io/test/github/thobach/MMM-MicrosoftToDo/badge.svg?)](https://snyk.io/test/github/thobach/MMM-MicrosoftToDo)\n[![Build Status](https://travis-ci.com/thobach/MMM-MicrosoftToDo.svg?branch=master)](https://travis-ci.com/thobach/MMM-MicrosoftToDo)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/thobach/MMM-MicrosoftToDo.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/thobach/MMM-MicrosoftToDo/context:javascript)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/thobach/MMM-MicrosoftToDo.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/thobach/MMM-MicrosoftToDo/alerts/)\n\n# MMM-MicrosoftToDo\nMMM-MicrosoftToDo is a 3rd party module for [MagicMirror](https://github.com/MichMich/MagicMirror) that shows open tasks from task lists and allows to complete them as well. The tasks are retrieved from Microsoft To Do / Outlook.\n\nThe idea of this module is to display a shopping list on your mirror that you can control from your Microsoft To Do app and collaborate on with your family. Originally I used [MMM-Wunderlist](https://github.com/paviro/MMM-Wunderlist), though Wunderlist will be shut down and replaced by Microsoft To Do.\n\nView in Microsoft ToDo app:\n\n\u003cimg src=\"/screenshots/microsoft%20todo%20original%20app.png?raw=true\" width=\"200\" alt=\"View in Microsoft ToDo app\" /\u003e\n\nScreenshot of this MMM-MicrosoftToDo module:\n\n\u003cimg src=\"/screenshots/microsoft%20todo%20magic%20mirror%20module.png?raw=true\" width=\"200\" alt=\"Screenshot of the MMM-MicrosoftToDo module\" /\u003e\n\n\n## Functionality\n* Display open to do list items from a to do list managed by Microsoft To Do\n* Update contents every minute\n* Complete task when clicking on it (disabled by default)\n\n## Preparation\nIn order to configure this module, you'll need some configuration parameters from Microsoft, which can be obtained as described in this section. All steps are required as the configuration parameters are needed for the installation below.\n\n### Web App Registration (Client ID)\nRegister an app at https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps (sign-in first if needed)\n1. Click on \"+ New registration\"\n2. Enter as \"Name\": \"Magic Mirror\"\n3. Select as \"Supported account types\": \"Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)\"\n4. Click \"Register\"\n4. On the following screen click on \"Add a Redirect URI\", then \"Add a Platform\", select \"Web\"\n5. Set as \"Redirect URIs\": \"https://localhost:1234\"\n6. Check \"Access tokens\"\n6. Click \"Configure\"\n7. Go to \"Overview\" and copy the \"Application (client) ID\" (Client ID), e.g. `4ef19f40-4892-4905-b999-76041e991f53`\n\nNote: This setup does not work under an Azure Germany (with T-Systems as data trustee) account.\n\n### Client Secret Key Generation (Client Secret)\n1. Go to \"Certificates \u0026 secrets\"\n2. Click \"+ New client secret\"\n3. Set as \"Description\": \"Magic Mirror\"\n4. Select as \"Expires\": \"24 Months\"\n5. Click \"Add\"\n6. Copy the \"Value\", e.g. `1Q25lsZTKEDf4RWBKVUbKjnaVuXytPaB`, it will be the `client secret` you need later\n\n### Authorization Code Generation (Code)\nCreate authorization code by opening the following URL in your browser (but replace the client_id with your value):\n```\nhttps://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code\u0026client_id=4ef19f40-4892-4905-b999-76041e991f53\u0026scope=offline_access%20user.read%20tasks.readwrite%20tasks.read\u0026redirect_uri=https://localhost:1234\u0026response_mode=query\u0026state=12345\n```\n1. Login and click on \"Yes\" and wait to be redirected\n2. Your browser will be redirected to https://localhost:1234 and probably show an error message, this is expected\n3. Copy the `code` parameter from the URL in the browser, e.g. `M30cd0dff-af91-d061-8755-ffb3b328aa03` from\n```\nhttps://localhost:1234/?code=M30cd0dff-af91-d061-8755-ffb3b328aa03\u0026state=12345\n```\n\n### Refresh Token Generation (Refresh Token)\nGenerate refresh token to allow the module to retrieve your task list going forward\n1. Open Terminal app\n2. Run the following command with your `client_id` (Client ID), `code` (Code) and `client_secret` (Client Secret) parameters (don't forget the trailing `\"`)\n```bash\ncurl -X POST https://login.microsoftonline.com/common/oauth2/v2.0/token -H \"Content-Type: application/x-www-form-urlencoded\" -d \"grant_type=authorization_code\u0026client_id=4ef19f40-4892-4905-b999-76041e991f53\u0026scope=offline_access%20user.read%20tasks.readwrite%20tasks.read\u0026code=M30cd0dff-af91-d061-8755-ffb3b328aa03\u0026redirect_uri=https%3A%2F%2Flocalhost%3A1234\u0026client_secret=1Q25lsZTKEDf4RWBKVUbKjnaVuXytPaB\"\n```\n3. Copy the value of the `refresh_token` parameter from the response, e.g. `refresh_token`:\n```\nMCVDmtyumC8ZdlGxrkMwCdur4FbPh7GHjy1gOaOHEA8*c5tTI4oIcJAHU8AflLZMLmcCRWNEa7nMkag2hbipYbZ3QgL9JB1G6Hc*JZY9oA5j46Cq79b6BDx8mivTVen0r*39h2hw9pngKS7MGXjKc9efwayQ7UhsFoCJ2wdhLJzv5gTR2EozgcsKsxHODj!1fV8a1sqVqJ!sU*CBLTMsm0twI2hZqsCkPoSWaMIS5kKFAq7bCsfNaumS11TZYni3XjVwuyHn4DEqfLGjHuSNo1TYRifcG422MdG6bYt7tBxWiw5dlq2iIEMl6O*N2sLWU7W0Ns2*oQbcXIFxRsZ8cHP*6M9dn*9Axg8WbtERj!*jHTfC!Ax6IILXrHDJkdAXgh01PVH!huztVrgd0UC6E4R4zJSOa4ytOKWfQcL9h0NdA\n```\nfrom the full response\n```javascript\n{\"token_type\":\"Bearer\",\"scope\":\"User.Read Tasks.Read\",\"expires_in\":3600,\"ext_expires_in\":3600,\"access_token\":\"EwBwA8l6BAAUO9chh8cJscQLmU+LSWpbnr0vmwwAAQMC79sEwx4KyeAHQmWi48AYLyFufrOurKrSQRBVaB1CPFwrn/CniDdPAEQYSzb95gEseUsnH3QAjbfi1s5Ya8oW5tLW2atfMG8ttdCnN/Rl8/ZdzfZcFkFQSgJ3kibm33Ov9NGXkKubHBgk0etwhyBsFR25PcDRZgc9hLIgR3dt9OCTF+Ph5lRQqOX8ABQbYy6zm15BHKSOqbHF82QHntrqUZf9u94J7S0ez0reltsOdrFTK0rWcbTMAWjNQfBLoMvdJnqVgTSF++WvkTQCCjTpu+LDEfA7axWBDfAQIXh+KFh2OfLVhST4NKPQNrRgsyI0Mi3kKak/gC7/are8bxQDZgAACHz3HW3uBQHCQAKbkNX8hKy6+AODSWnD/zP0vkRXsoRkiR3JJH7VxrnB31qo9W3Y9PokxT2SBj/97BPmuiJDJ98j190k+MJ/W1kLsL7PbZN9svwLEk8UpPDF2MDiu7GTdhvS7fPDODRBBrK75fU+n1wynvTas+q3ybFM+d0fiqW0p9eUxb7GsK1A0BwXpARW+oFQ2W1g7lzq/w2ss+NyvbjUpizEWw9hUFgJhi32b3ww/r7f0faZRz9vmsLSahbvywo2HG7gzJRdSFbUnoxXRJdFeQpCfxRIhLbE/fx9rB9e0+ENWRuuWqpuJNFjHW9VcV837KAqEwJE9T0F0bacYIq1mcm/n+7g6HSOs27H9LtEHZec6Z+nPPYLxFiN2uRqKaVC7ZBCf6DLfUtQ9sbaDlzI+UUe+GnCTnc2is/hbjYPtK/leiUvOk3jxYBGuU2Jb1kPxH3ahRFlmBYB0mQtbqgOa9DNi0An9eMy+Y/uaLP7EVweQd2bFcBt7tF1nLMQQNUNBfYUva/b2S4SsTVsbHp2tCRmrufFmLrQtFDaG/zJY+tZmnwy8QjbYch9CwEMWRe8+mrtwWy4JKwK00SxoApoDgsaQK/aRYkR5+kn1N/NSwkByyKK6oMbRlFf9SnRsqdFIlgW7gmeizEPhRGqvwTnltghoQdM/aSqY53UQ2jd6H0vYy1PFBtq2s6EGL0Mf9az7JguOgee/WBrI3bN4hQn/xGnrGpkaghsD/2mtRxOAkoEMdxfYQRO60eknbF2QsyYjoOS6V/9ClhzAg==\",\"refresh_token\":\"MCVDmtyumC8ZdlGxrkMwCdur4FbPh7GHjy1gOaOHEA8*c5tTI4oIcJAHU8AflLZMLmcCRWNEa7nMkag2hbipYbZ3QgL9JB1G6Hc*JZY9oA5j46Cq79b6BDx8mivTVen0r*39h2hw9pngKS7MGXjKc9efwayQ7UhsFoCJ2wdhLJzv5gTR2EozgcsKsxHODj!1fV8a1sqVqJ!sU*CBLTMsm0twI2hZqsCkPoSWaMIS5kKFAq7bCsfNaumS11TZYni3XjVwuyHn4DEqfLGjHuSNo1TYRifcG422MdG6bYt7tBxWiw5dlq2iIEMl6O*N2sLWU7W0Ns2*oQbcXIFxRsZ8cHP*6M9dn*9Axg8WbtERj!*jHTfC!Ax6IILXrHDJkdAXgh01PVH!huztVrgd0UC6E4R4zJSOa4ytOKWfQcL9h0NdA“}\n```\n\n## Installation\n1. Navigate into your MagicMirror's `modules` folder and execute `git clone https://github.com/thobach/MMM-MicrosoftToDo.git`.\n2. Install dependencies via: `cd MMM-MicrosoftToDo \u0026\u0026 npm install`\n3. In order to load the MMM-MicrosoftToDo module you will need to add the following configuration to your `config/config.js` file. As `oauth2ClientSecret` you need to provide Client Secret from above, as `oauth2RefreshToken` you set the Refresh Token, as `oauth2ClientId` you set the Client ID and as `listName` you set the exact name of the task list, or leave it blank to show items from the default \"Tasks\" list.\n```javascript\nmodules: [\n  {\n    module: 'MMM-MicrosoftToDo',\n    position: 'top_left',\t// This can be any of the regions. Best results in left or right regions.\n    header: 'Shopping List', // This is optional\n    config: {\n      oauth2ClientSecret: '1Q25ls%3FTKEDf4RWBKVUbKjnaVu%3DytP.%5B',\n      oauth2RefreshToken: 'MCVDmtyumC8ZdlGxrkMwCdur4FbPh7GHjy1gOaOHEA8*c5tTI4oIcJAHU8AflLZMLmcCRWNEa7nMkag2hbipYbZ3QgL9JB1G6Hc*JZY9oA5j46Cq79b6BDx8mivTVen0r*39h2hw9pngKS7MGXjKc9efwayQ7UhsFoCJ2wdhLJzv5gTR2EozgcsKsxHODj!1fV8a1sqVqJ!sU*CBLTMsm0twI2hZqsCkPoSWaMIS5kKFAq7bCsfNaumS11TZYni3XjVwuyHn4DEqfLGjHuSNo1TYRifcG422MdG6bYt7tBxWiw5dlq2iIEMl6O*N2sLWU7W0Ns2*oQbcXIFxRsZ8cHP*6M9dn*9Axg8WbtERj!*jHTfC!Ax6IILXrHDJkdAXgh01PVH!huztVrgd0UC6E4R4zJSOa4ytOKWfQcL9h0NdA',\n      oauth2ClientId: '4ef19f40-4892-4905-b999-76041e991f53',\n      listName: 'Shopping List', // optional parameter: if not specified displays tasks from default \"Tasks\" list, if specified will look for a task list with the specified name (exact spelling), don't specify if you want to make use of the 'includedLists' configuration property of the 'plannedTasks' configuration.\n      // Optional parameter:  see Planned Tasks Configuration\n      plannedTasks: {\n        enable: false\n      },\n      showCheckbox: true, // optional parameter: default value is true and will show a checkbox before each todo list item\n      showDueDate: false, // optional parameter: default value is false and will show the todo list items due date if it exists on the todo list item\n      dateFormat: 'ddd MMM Do [ - ]', //optional parameter: uses moment date format and the default value is 'ddd MMM Do [ - ]'\n      useRelativeDate: true, // optional parameter: default value is false and will display absolute due date, if set to false will show time in hours/days until item is due (midnight of due date)\n      highlightTagColor: '#E3FF30', // optional parameter: highlight tags (#Tags) in the entry text. value can be a HTML color value\n      hideIfEmpty: false, // optional parameter: default value is false and will show the module also when the todo list is empty\n      maxWidth: 450, // optional parameter: max width in pixel, default value is 450\n      itemLimit: 200, // optional parameter: limit on the number of items to show from the list, default value is 200\n      orderBy: 'createdDate', // optional parameter: 'createdDate' - order results by creation date, 'dueDate' - order results by due date, 'importance' - order result by priority (e.g. starred), default value is unordered, ordering by title is not supported anymore in API version 1\n      completeOnClick: true, // optional parameter: default value is false, when set to true complete task when clicking on it\n      refreshSeconds: 60, // optional parameter: every how many seconds should the list be updated from the remote service, default value is 60\n      fade: true, //optional parameter: default value is false. True will fade the list towards the bottom from the point set in the fadePoint parameter\n      fadePoint: 0.5, //optional parameter: decimal value between 0 and 1 sets the point where the fade effect will start,\n      colorDueDate: false // optional parameter: default value is false.  True will display colors for overdue (red), upcoming (orange), and future (green) dates\n    }\n  },\n]\n```\n## Planned Tasks Configuration\nMicrosoft ToDo offers a Planned smart list which shows tasks with a due date across all lists.  You can use the `plannedTasks` configuration section to mimic this functionality in MMM-MicrosoftToDo.\n\nWhen enabled, make sure the `listName` parameter is not set. Tasks are then retrieved from all lists which match the following criteria:\n* Task Status is not equal to `completed`\n* Task DueDate is set\n* Task Due date is less than the current date + the configured duration.\n\nIn other words, if you just enable the Planned Tasks configuration, the default values for `duration` and `includedLists` will take tasks from all lists which are not completed and have a due date less than 2 weeks from today.  That will include any tasks that are overdue.\n\n### Example\n```\n{\n  module: 'MMM-MicrosoftToDo',\n  position: 'bottom_left',\t// This can be any of the regions. Best results in left or right regions.\n  header: 'Planned Tasks', // This is optional\n  config: {\n    oauth2ClientSecret: 'yourClientSecret',\n    oauth2RefreshToken: 'yourRefreshToken',\n    oauth2ClientId: 'yourClientId',\n    plannedTasks: {\n      enable: true,\n      duration: {\n        weeks: 2\n      },\n      includedLists: [ \"Legal\" ] // string array with regular expression patterns.  If a list's displayName matches one of the patterns, it's included\n    }\n  }\n}\n```\n\n### `plannedTasks` options\n\n| Option Name | Type    | Description | Default Value |\n| ----------- | ----    | ----------  | ------------- |\n| enable      | `bool`  |             | `false`       |\n| duration    | `object`| A duration object, as defined in the [date-fns add](https://date-fns.org/v2.27.0/docs/add) function.  | `{ weeks: 2}` |\n| includedLists | `string[]`| A string list a collection of RegExp patterns.  If a list's `displayName` matches one of the [RegEx](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) patterns, it's included | `[ '.*' ]` |\n\n### Why \"Include\" instead of \"Ignore\"?\nMicrosoft will throttle the number of calls you can make to its APIs, and, the current ToDo API does not allow you to query for tasks across all lists.  Therefore, an API call must be made for each list.  We have noticed throttling during testing with as few as 15 lists, so it is wise to limit the lists you choose to include.  While the default will attempt to use all lists, it's advisable to limit yourself to less than 10 to prevent throttling.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthobach%2FMMM-MicrosoftToDo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthobach%2FMMM-MicrosoftToDo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthobach%2FMMM-MicrosoftToDo/lists"}