You may find useful information in the overview / post mortem slides (unfortunately in German as of now).
Due to other commitments I can no longer maintain the further development of this skill. (e.g. adjust to updated MS Graph API, support more languages, full 2-way-sync,...)
Alexa skill that allows integration with Microsoft To-Do
Remember to npm install
first.
Needed to authenticate with Microsoft Account for accessing ToDo list items
Authentication guide for Microsoft Graph: https://docs.microsoft.com/en-us/graph/auth/auth-concepts
- Azure Active Directory -> App registrations -> + New registration
- Create name.
- Account types: Accounts in any organization and personal Microsoft Accounts
- Redirect URIs added later
- Add platform -> Web
- Redirect URIs come from Linked Account Settings in Alexa dashboard
- Implicit grant and hybrid flows: Leave both boxes unchecked
- Add permission for Microsoft Graph Tasks.ReadWrite
- Within skill, go to Build tab, and select "Models" on far left menu
- Click left menu item for Account Linking
- Enable linking
- Choose authentication method of Auth Code Grant (not Implicit)
- Access token and Authorization URLs can be found in App registration (App overview -> Endpoints [top bar])
- Client Id: Application (Client) Id in App registration overview
- Client secret: Create a secret in App registration "Certificates & secrets" section.
- Authentication type: In Request Body
- Scopes: Add scopes of:
https://graph.microsoft.com/Tasks.ReadWrite
(to read/write tasks through Graph)offline_access
(so the /token url endpoint also returns a refresh token)
- Copy Amazon-provided redirect URLs into Redirect URIs of registered App (step 2 in App authentication settings)
CLI for Alexa 'Ask' API
npm install ask-cli
(Do this in the lambda\custom directory, where package.json already exists)
ask <command>
--or-- .\node_modules\.bin\ask
--or-- .\node_modules\.bin\ask.cmd
Configure (login) after installing with ask configure
https://developer.amazon.com/en-US/docs/alexa/smapi/steps-to-create-a-list-skill.html
-
Download skill manifest
PowerShell:
.\node_modules\.bin\ask smapi get-skill-manifest -s <skill-id> -g development | Out-File -Encoding ascii manifest.json
-
Add required properties (in guide above)
-
Update manifest
PowerShell:
.\node_modules\.bin\ask smapi update-skill-manifest -s <skill-id> -g development --debug --manifest "file:manifest.json"
Note: After updating, some settings (like account linking) are no longer available in the web dashboard.
-
Download linking info
PowerShell:
.\node_modules\.bin\ask smapi get-account-linking-info -s <skill-id> -g development | Out-File -Encoding ascii acct-linking.json
Skill Id is retrieved from Alexa Skills dashboard: https://developer.amazon.com/alexa/console/ask
-
Change "accountLinkingResponse" in file to "accountLinkingRequest"
-
Add property
"clientSecret": <secret>,
-
Send update
PowerShell:
.\node_modules\.bin\ask smapi update-account-linking-info -s <skill-id> -g development --debug --account-linking-request "file:acct-linking.json"