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.
- Visit the Azure Portal.
- Register a new application.
- Set the Redirect URI to:
http://localhost:8000/callback - Add the following Delegated API Permissions under Microsoft Graph:
offline_accessTasks.ReadWriteUser.Reademailprofileopenid
- Grant Admin Consent for all the above permissions.
Run 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)- Upload or install the plugin via Dify's Plugin Marketplace.
- Go to:
Tools > microsoft_todo > Authorize - Paste your
Access Tokenand 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.
- 📝 Create tasks instantly
- 📋 Retrieve all your todos
- ❌ Delete any task
- ✅ Mark tasks as completed
- 🔒 Secure OAuth-based access
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


