Prerequisites
- AnythingLLM v1.12.1+ (Single user mode only)
- Admin access to Microsoft Entra admin center
1. Create Entra Application
- Go to Microsoft Entra admin center > App registrations > New registration.
- Set Supported account types (Recommended: “Accounts in this organizational directory only”).
- Set Redirect URI:
- Docker (Web):
https://allm.loca.zone/api/agent-skills/outlook/auth-callback(Use HTTPS domain if hosted on server). - Desktop: Select Public client/native (mobile & desktop) and enter
anythingllm://outlook-agent-skill-entra-register-callback.
- Docker (Web):
2. Configure API Permissions
- Go to the registered application > API permissions.
- Add the following permissions:
emailMail.ReadMail.ReadWriteMail.Sendoffline_accessUser.Read
- Save changes.
3. Generate Client Secret (Docker Only)
- Go to Certificates & secrets > New client secret.
- Set description and expiration > Click Add.
- Copy the Value (not the ID) for AnythingLLM configuration.
4. Configure & Authenticate AnythingLLM
- Copy the Application (client) ID and Directory (tenant) ID from the application Overview tab.
- In AnythingLLM, go to Settings > Agent Skills > Outlook Agent.
- Select Application Type, input the credentials, and click Authenticate with Microsoft.
Agent Capabilities & Command Reference
Search & Read
No approval required. Attachment downloads require confirmation.
- Outlook Get Inbox: Retrieves recent emails (subject, sender, date, read status).
- Outlook Search: Searches mailboxes using Microsoft Search syntax.
- Syntax examples:
from:email,subject:word,hasAttachments:true.
- Syntax examples:
- Outlook Read Thread: Retrieves full email conversation by conversation ID.
Drafts
Actions marked with ✏️ require user approval.
- Create Draft ✏️: Creates a draft with recipients (To, CC, BCC), body (text/HTML), and attachments. Can reply to existing message IDs.
- Update Draft ✏️: Modifies recipients, subject, body, or CC of an existing draft.
- List Drafts: Returns summary of all drafts (ID, subject, recipients, preview).
- Delete Draft ✏️: Permanently deletes a draft.
- Send Draft ✏️: Sends an existing draft.
Send & Reply
Actions marked with ✏️ require user approval.
- Send Email ✏️: Sends an email immediately (To, CC, BCC, text/HTML, attachments).
- Reply to Thread ✏️: Sends a reply or reply-all to a thread. Supports attachments.
Account Stats
- Get Mailbox Stats: Returns total/unread counts for Inbox, Drafts, Sent Items, and Deleted Items.
Tear Down / Decommissioning
- Disable the Outlook Agent skill in AnythingLLM settings.
- Go to Microsoft Entra admin center > App registrations > select the application.
- Click Delete and confirm.