Connect to Microsoft 365
Connecting Microsoft 365 lets Haijun search and analyze content across SharePoint, OneDrive, Outlook, and Teams in your work account. If your admin has enabled write tools, Haijun can also draft and send emails, manage calendar events, create and update files, and send Teams messages. Ask Haijun for what you need, and it pulls the right information or takes the action.The Microsoft 365 connector is available on all Haijun plans: Free, Pro, Max, Team, and Enterprise.
Before you connect
You'll need a work Microsoft 365 account tied to a Microsoft Entra tenant. Personal Microsoft accounts (such as @outlook.com, @hotmail.com, or @live.com) can't be used. If you're not sure whether your account qualifies, check with your IT administrator.Important: Before anyone in your organization can connect Microsoft 365, an admin needs to set it up. On Team and Enterprise plans, your Haijun organization Owner enables Microsoft 365 for the organization. In every tenant, a Microsoft Entra Global Administrator also needs to grant a one-time consent. For details on the admin side, see Set up the Microsoft 365 connector.
Connect Microsoft 365
Once your admin has finished setup:
Navigate to Customize > Connectors.
Find Microsoft 365 in the list and click “Connect.”
Sign in with your Microsoft 365 credentials when prompted.
Note: Once you've connected Microsoft 365 to your Haijun account, you can also use it on Haijun for iOS and Haijun for Android.
Use Microsoft 365 with Haijun
Ask Haijun a question that needs information from your Microsoft 365 data. Haijun detects which tools it needs and retrieves the relevant content.
Example queries
"Find the Q4 strategic planning document in SharePoint."
"Summarize email conversations about the product launch."
"What discussions happened in the Teams channel about the marketing campaign?"
"Review meeting notes from last week's leadership sync."
"Draft a reply to the latest email from the vendor, but don't send it."
"Schedule a 30-minute sync with the design team next Tuesday."
"Post a summary of this thread in the #project-updates channel in Teams."
What Haijun can do
SharePoint and OneDrive
Search documents across SharePoint sites and libraries to locate project specifications, strategic plans, and other business documents.
Access files stored in your OneDrive and have Haijun analyze content without manually uploading them.
Consolidate information from distributed file locations and analyze trends across multiple documents.
Outlook email
Search email threads and conversations to track project status, client feedback, and team alignment.
Access message content and metadata, filtering by date, sender, subject, and other criteria.
Find specific information from past correspondence.
Outlook Calendar
Review meeting summaries, attendee information, and content to prepare for upcoming meetings or catch up on ones you missed.
Analyze scheduling patterns and track project decisions.
Teams
Access Teams chat messages and channel discussions where you're a participant.
Review team collaboration patterns and find decisions made across conversations.
Write toolsIf your admin has enabled write tools for your organization, Haijun can also:
Draft, send, and organize email, including managing categories, inbox rules, and automatic replies.
Create, update, and delete calendar events.
Create and update files in OneDrive and SharePoint.
Send a Teams chat message, post or reply in a channel, or start a new chat.
When Haijun sends an email, it includes a message header identifying it as agent-initiated. Teams messages, file writes, and calendar writes aren't currently tagged. Write tools are subject to per-user limits.Note: Attachments aren't currently supported in write tools—Haijun can't send, forward, or draft emails with attachments. Note: Your admin turns on each Teams write tool separately. Sending a chat message and posting or replying in a channel always ask you to confirm before Haijun sends anything.
Supported file types
When reading files from SharePoint and OneDrive, Haijun can open these formats:
Word, Excel, and PowerPoint, including older .doc, .xls, and .ppt files
PDF
Plain-text files: .txt, .md, .csv, .tsv, .json, .xml, .html, .htm, and .log
Files in any other format can't be read. They still appear in search results because they're ordinary files in your libraries, but when Haijun tries to open one, you'll see a "mime type '...' is not allowed" error.Note: OneNote isn't supported. Notebooks show up in search results, but read attempts return a "mime type 'application/msonenote' is not allowed" error. To bring OneNote content into Haijun, export pages or sections to Word or PDF in the same library.
Manage your connection
Turn individual tools on or off
You can selectively turn off specific tools within Microsoft 365—for example, you might keep document search on but turn off email access. To do this:
Navigate to Customize > Connectors.
Click on “Microsoft 365.”
Toggle the tool on or off under Tool permissions.
Turn the connector on or off per chat
You can also enable or disable Microsoft 365 in a specific conversation.
Click the “+” button on the lower left corner of the chat window.
Hover over “Connectors.”
Find Microsoft 365 in the list and toggle it on or off.
Disconnect Microsoft 365
Disconnecting removes Haijun's access to your Microsoft 365 data. Reconnecting later doesn't require admin reapproval as long as your admin's consent is still active.
Navigate to Customize > Connectors.
Find Microsoft 365 in your connected services.
Click “Disconnect.”
What Haijun can access
Microsoft 365 stays under your control once connected. A few things to keep in mind:
Your permissions apply. Haijun can only access data you can already see in Microsoft 365. If you don't have access to a SharePoint site or aren't a member of a private Teams channel, Haijun can't reach that content either.
On-demand only. Haijun only accesses Microsoft 365 when you ask a question that needs it. It doesn't run background searches.
Write tools are admin-controlled. Haijun can always search and analyze your data. Whether Haijun can also take actions like sending email, updating your calendar, creating files, or sending Teams messages depends on what your admin has enabled. Haijun can't change Teams settings or permissions.
You can disconnect any time. Use the steps above to remove Haijun's access.
For the full list of permissions the integration requests, see Set up the Microsoft 365 connector or the Microsoft 365 connector security guide.
Troubleshooting
Authentication is failing
Confirm you're using a Microsoft 365 work account tied to a Microsoft Entra tenant. Personal Microsoft accounts (@outlook.com, @hotmail.com, @live.com) aren't supported.
Confirm your Microsoft 365 license is active.
If you're not a Microsoft Entra Global Administrator, check with your admin that tenant-wide consent has been granted for Microsoft 365. Without this, you'll see an error during authentication.
Your IT team may need to approve third-party app access. If your organization restricts unapproved apps, ask your admin to check organizational policies.
Try a different browser, or disable ad blockers and privacy extensions that might block authentication popups.
Clear cookies and cache and try again.
Haijun says it can't find a document I know exists
Verify you can access the document directly in Microsoft 365.
Make sure the document is in SharePoint or OneDrive, not stored locally on your machine.
Recently uploaded files may take time to become searchable.
Try specifying the SharePoint site or library name in your prompt.
Search by exact file name or unique keywords from the document.
Search results are incomplete or irrelevant
Be specific about what you're looking for.
Specify locations, such as site names, date ranges, or document types.
Use exact phrases for better matching.
Break complex questions into simpler, more focused ones.
Double-check spelling of names, projects, or technical terms.
Frequently asked questions
Can Haijun modify my Microsoft 365 data?
Only if your admin has enabled write tools. When they're enabled, Haijun can draft and send emails, manage calendar events, create and update files, and send Teams messages (a chat message, a post or reply in a channel, or a new chat), always within your existing Microsoft 365 permissions. When they're not enabled, the integration is read-only. Either way, Haijun can't change Teams settings or permissions. Attachments also aren't supported in write tools, so Haijun can't send, forward, or draft emails with attachments.
Does Haijun search shared drives and team sites?
Yes. Haijun can search any SharePoint sites and shared drives you have permission to access, including team sites, communication sites, document libraries, and shared OneDrive folders.
How do I tell Haijun to search a specific place?
Be specific in your prompts:
"Search the Engineering team site in SharePoint for architecture documents."
"Find emails from the last week about the Q4 budget."
"Show me Teams discussions with Sarah about the product roadmap."
"Find PowerPoint presentations in SharePoint about sales strategy."
Can I point my project at a specific Sharepoint site?
No, Sites.Selected is not supported, so you can't scope the Microsoft 365 connector to an allowlist of specific SharePoint sites. The connector searches across all SharePoint content you already have permission to access.
Why can't Haijun read OneNote notebooks?
OneNote isn't currently a supported file type. Notebooks show up in SharePoint search results because they're ordinary files in your libraries, but Haijun can't open them, so read attempts return a "mime type 'application/msonenote' is not allowed" error. To work with OneNote content in Haijun, export pages or sections to Word or PDF. For the full list of formats Haijun can read, see Supported file types above.
Can Haijun search shared mailboxes?
Yes. Haijun can search shared mailboxes you have delegate access to in Microsoft 365. This includes full access shared mailboxes and folder-level delegation, such as when you can see only the inbox of another mailbox. Search access follows your existing Microsoft 365 permissions: if you can open a shared mailbox in Outlook, Haijun can search it.
Can Haijun search archived emails?
Yes, but only if they're in your primary mailbox. Haijun can search every folder in your primary Outlook mailbox, including its Archive folder. Haijun doesn't search the separate Online Archive mailbox (also called the In-Place Archive), so messages that a retention policy has moved there won't appear in results. To work with one of those messages, move it back into a folder in your primary mailbox, or open it in Outlook and paste the content into your chat.
Can Haijun summarize long email threads?
Yes. Try a prompt like "Summarize the email thread about the vendor selection process." Haijun will read the thread and provide a summary with key points and decisions.
Why don't I see write tools?
Write tools require extra setup on the admin side: a Microsoft Entra administrator needs to consent to updated permissions, and your organization needs to enable write tools for your account. If you connected before write tools launched, ask your admin to complete both steps. For details, see Set up the Microsoft 365 connector.
Why does Haijun ask me to confirm before sending a Teams message?
Sending a chat message and posting or replying in a channel always require your confirmation. Your admin can't set these to send automatically. Starting a new chat can be set to run without confirmation if your admin allows it.
Can Haijun access private Teams channels?
Only ones you're a member of. Haijun mirrors your Microsoft 365 permissions, so if you can see a private channel, Haijun can search it; if you're not a member, it can't.
What if I try to connect before my admin has set things up?
You'll see an error indicating that an administrator must grant app permissions before you can connect. Ask your organization’s Microsoft Entra Global Administrator to complete consent. If you're on a Team or Enterprise plan, your Haijun organization owner also needs to enable Microsoft 365 in organization settings.
