by ayush3941 · v0.0.1
Manage your tasks using Microsoft Todo API — create, retrieve, delete, and mark tasks as completed.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
microsoft_todo is a task management plugin powered by the Microsoft Graph API. It allows users to create, fetch, delete, and complete tasks within Microsoft Todo. Designed for developers building productivity and workflow tools, microsoft_todo offers a one-time integration with long-term convenience for task-based apps.
Create an app on the Azure Portal to obtain your client ID and configure Microsoft Graph API permissions.
The microsoft_todo tools can be found in the Plugin Marketplace. Please install the plugin first.
http://localhost:8000/callbackoffline_accessTasks.ReadWriteUser.ReademailprofileopenidRun a Flask server to complete OAuth2 flow and decode the token:
pip install flask requests pyjwt[crypto]
# auth_server.py
from flask import Flask, request
import requests, jwt
CLIENT_ID = "<your-client-id>"
CLIENT_SECRET = "<your-client-secret>"
TENANT_ID = "<your-tenant-id>"
REDIRECT_URI = "http://localhost:8000/callback"
AUTHORITY = f"https://login.microsoftonline.com/{TENANT_ID}"
TOKEN_URL = f"{AUTHORITY}/oauth2/v2.0/token"
app = Flask(__name__)
@app.route("/")
def index():
return '''
<a href="{AUTHORITY}/oauth2/v2.0/authorize?client_id={CLIENT_ID}&response_type=code&redirect_uri={REDIRECT_URI}&response_mode=query&scope=offline_access%20Tasks.ReadWrite%20User.Read%20email%20profile%20openid">Login with Microsoft</a>
'''
@app.route("/callback")
def callback():
code = request.args.get("code")
data = {
"client_id": CLIENT_ID,
"scope": "offline_access Tasks.ReadWrite User.Read email profile openid",
"code": code,
"redirect_uri": REDIRECT_URI,
"grant_type": "authorization_code",
"client_secret": CLIENT_SECRET
}
resp = requests.post(TOKEN_URL, data=data)
token_json = resp.json()
access_token = token_json.get("access_token")
refresh_token = token_json.get("refresh_token")
decoded = jwt.decode(access_token, options={"verify_signature": False})
return f'''
✅ Access Token: {access_token}<br><br>
🔁 Refresh Token: {refresh_token}<br><br>
👤 User: {decoded.get('name')}<br>
🔑 Scopes: {decoded.get('scp')}<br>
'''
if __name__ == "__main__":
app.run(port=8000)
Tools > microsoft_todo > AuthorizeAccess Token and you're ready to use the tool.On the Dify navigation page, click Tools > microsoft_todo > Authorize and enter the required OAuth credentials or access token.
Create a new task inside your Microsoft Todo default list.
Fetch all active tasks from your Todo list.
Delete a specific task using its unique ID.
Mark a task as completed in Microsoft Todo.
You can use the microsoft_todo tool in the following application types:
Both Chatflow and Workflow applications support adding a microsoft_todo tool node.
This tool is currently not supported in Agent applications.
Contact me: https://github.com/Ayush3941/microsoft_todo @Ayush3941